summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-06-12 18:19:42 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-06-12 18:19:42 +0200
commit5364cdbeafa52c442c7a4a9b8ce9ac1db377fc00 (patch)
tree3805bedd00c80193b1d0fb422a2421e4dc72900d
parentc058de1ca7f7948ab79f717c3d6ebd2b3b2f7a9e (diff)
Add USART registers.
-rw-r--r--stm32.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/stm32.h b/stm32.h
index 455f130..891ba78 100644
--- a/stm32.h
+++ b/stm32.h
@@ -61,4 +61,18 @@ struct I2C_t {
static I2C_t& I2C1 = *(I2C_t*)0x40005400;
static I2C_t& I2C2 = *(I2C_t*)0x40005800;
+struct USART_t {
+ volatile uint32_t SR;
+ volatile uint32_t DR;
+ volatile uint32_t BRR;
+ volatile uint32_t CR1;
+ volatile uint32_t CR2;
+ volatile uint32_t CR3;
+ volatile uint32_t GTPR;
+};
+
+static USART_t& USART1 = *(USART_t*)0x40013800;
+static USART_t& USART2 = *(USART_t*)0x40004400;
+static USART_t& USART3 = *(USART_t*)0x40004800;
+
#endif