From 2b62b6d60dfc5cc3e770bec8a46ccdc617c34b99 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Mon, 11 Mar 2013 17:22:10 +0100 Subject: [PATCH] Use the defined flags instead of hardcoded values --- drivers/i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.43.0