X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fio%2Fstm32_i2c.h;h=a7e375fb7df70599186a3481ee7aac8a2719612b;hb=deaee79553cf04ca1f548ca005dc399523c8f541;hp=1f6b3adb76c90c451fca5f714940446b7ad4ab4a;hpb=a672c20aa703dc23a672884a7c250da0f58fd1e0;p=bertos.git diff --git a/bertos/cpu/cortex-m3/io/stm32_i2c.h b/bertos/cpu/cortex-m3/io/stm32_i2c.h index 1f6b3adb..a7e375fb 100644 --- a/bertos/cpu/cortex-m3/io/stm32_i2c.h +++ b/bertos/cpu/cortex-m3/io/stm32_i2c.h @@ -241,7 +241,8 @@ /* I2C CR1 */ -#define CR1_POS 11 +#define CR1_POS_SET ((uint16_t)0x800) +#define CR1_POS_RESET (~CR1_POS_SET) /* I2C Status */ #define SR1_PECERR 12 @@ -250,7 +251,7 @@ #define SR1_ARLO 9 #define SR1_BERR 8 #define SR1_TXE 7 -#define SR1_RXE 6 +#define SR1_RXNE 6 #define SR1_ADDR 1 #define SR1_BTF 2 #define SR1_SB 0 @@ -266,8 +267,6 @@ BV(SR1_ARLO) | \ BV(SR1_BERR)) - - struct stm32_i2c { reg16_t CR1;