diff options
-rw-r--r-- | stm32.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -43,5 +43,22 @@ struct GPIO_t { }; static GPIO_t& GPIOA = *(GPIO_t*)0x40010800; +static GPIO_t& GPIOB = *(GPIO_t*)0x40010c00; +static GPIO_t& GPIOC = *(GPIO_t*)0x40011000; + +struct I2C_t { + volatile uint32_t CR1; + volatile uint32_t CR2; + volatile uint32_t OAR1; + volatile uint32_t OAR2; + volatile uint32_t DR; + volatile uint32_t SR1; + volatile uint32_t SR2; + volatile uint32_t CCR; + volatile uint32_t TRISE; +}; + +static I2C_t& I2C1 = *(I2C_t*)0x40005400; +static I2C_t& I2C2 = *(I2C_t*)0x40005800; #endif |