From 10a6c74e7171cbd199c6a3c18d1025d762aadde8 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Thu, 2 Jun 2011 13:34:15 +0200 Subject: Added more registers. --- stm32.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/stm32.h b/stm32.h index 9b8ec59..455f130 100644 --- a/stm32.h +++ b/stm32.h @@ -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 -- cgit v1.2.3