From 5364cdbeafa52c442c7a4a9b8ce9ac1db377fc00 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 12 Jun 2011 18:19:42 +0200 Subject: Add USART registers. --- stm32.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- cgit v1.2.3