From: Nathael Pajani Date: Mon, 11 Mar 2013 16:22:10 +0000 (+0100) Subject: Use the defined flags instead of hardcoded values X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=2b62b6d60dfc5cc3e770bec8a46ccdc617c34b99;p=soft%2Flpc122x%2Fcore Use the defined flags instead of hardcoded values --- diff --git a/drivers/i2c.c b/drivers/i2c.c index 0d4e539..98885c6 100644 --- a/drivers/i2c.c +++ b/drivers/i2c.c @@ -476,7 +476,8 @@ void i2c_on(uint32_t i2c_clk_freq) mod_i2c.regs = (struct lpc_i2c*)LPC_I2C0; mod_i2c.state = I2C_OK; /* Enable I2C */ - i2c->ctrl_set = 0x40; /* Fixme, if enabling slave functions, write 0x44 instead */ + /* Fixme, if enabling slave functions, add I2C_ASSERT_ACK flag */ + i2c->ctrl_set = (I2C_ENABLE_FLAG); /* And enable interrupts */ NVIC_EnableIRQ(I2C0_IRQ); }