From 3696c07f0707daa106d85ccd2b81fbad1adb22dd Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 7 Feb 2022 22:12:55 +0000 Subject: stm32g4: initial platform support Have some demo code using lptim, lpuart, exti and rtc mostly working. It glitches into undefined exceptions, so it's a little concerning, but... it's all cross checked against RM0440_rev7, so it's pretty good. Signed-off-by: Karl Palsson --- pwr/stm32_pwr.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'pwr/stm32_pwr.h') diff --git a/pwr/stm32_pwr.h b/pwr/stm32_pwr.h index bb46ffd..2c49be6 100644 --- a/pwr/stm32_pwr.h +++ b/pwr/stm32_pwr.h @@ -2,6 +2,26 @@ #include +struct STM32_PWR_PULL_PORT_t { + volatile uint32_t PUCR; + volatile uint32_t PDCR; +}; + +struct STM32_PWR_reg_g4_t { + volatile uint32_t CR1; + volatile uint32_t CR2; + volatile uint32_t CR3; + volatile uint32_t CR4; + volatile uint32_t SR1; + volatile uint32_t SR2; + volatile uint32_t SCR; + uint32_t _reserved1; + volatile struct STM32_PWR_PULL_PORT_t PUPD[7]; + uint32_t _reserved2[10]; + volatile uint32_t CR5; +}; + + struct STM32_PWR_reg_wb_t { volatile uint32_t CR1; volatile uint32_t CR2; -- cgit v1.2.3