From 68f35527c43001ceff27b9ec6f35e3be339742ca Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Tue, 19 Jun 2012 15:33:30 -0400 Subject: Fix I2C_CR2_FREQ bit definition. The existing value clobbers the entire register. Signed-off-by: Marti Bolivar --- libmaple/include/libmaple/i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmaple/include/libmaple/i2c.h b/libmaple/include/libmaple/i2c.h index 4603837..8c5ab06 100644 --- a/libmaple/include/libmaple/i2c.h +++ b/libmaple/include/libmaple/i2c.h @@ -133,7 +133,7 @@ extern i2c_dev* const I2C2; #define I2C_CR2_ITBUFEN (1U << 10) // Buffer interrupt enable #define I2C_CR2_ITEVTEN (1U << 9) // Event interupt enable #define I2C_CR2_ITERREN (1U << 8) // Error interupt enable -#define I2C_CR2_FREQ 0xFFF // Peripheral input frequency +#define I2C_CR2_FREQ 0x3F // Peripheral input frequency /* Clock control register */ -- cgit v1.2.3