summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-06-02 13:34:15 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-06-02 13:34:15 +0200
commit10a6c74e7171cbd199c6a3c18d1025d762aadde8 (patch)
treebfc9145031be37a466edd0d7d70dd8cb1e90b2a5
parentd2e75eee1d017a7632faf017f40780a5255897f5 (diff)
Added more registers.
-rw-r--r--stm32.h17
1 files changed, 17 insertions, 0 deletions
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