summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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