summaryrefslogtreecommitdiff
path: root/pwr/stm32_pwr.h
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2022-01-06 23:19:16 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2022-01-26 23:40:29 +0100
commit1ddf184af5a633903e81ec07093968d8dec086c8 (patch)
tree4463126317f212d2d7387605c9fe3eb3a575648b /pwr/stm32_pwr.h
parent114eab5a0b5aa3f97ead07edabcfc93ee99b19d2 (diff)
stm32wb: pwr: initial registers
No helpers, just the register map. Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Diffstat (limited to 'pwr/stm32_pwr.h')
-rw-r--r--pwr/stm32_pwr.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/pwr/stm32_pwr.h b/pwr/stm32_pwr.h
new file mode 100644
index 0000000..d85b027
--- /dev/null
+++ b/pwr/stm32_pwr.h
@@ -0,0 +1,41 @@
+#pragma once
+
+#include <mmio/mmio.h>
+
+struct STM32_PWR_reg_wb_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;
+ volatile uint32_t CR5;
+ volatile uint32_t PUCRA;
+ volatile uint32_t PDCRA;
+ volatile uint32_t PUCRB;
+ volatile uint32_t PDCRB;
+ volatile uint32_t PUCRC;
+ volatile uint32_t PDCRC;
+ volatile uint32_t PUCRD;
+ volatile uint32_t PDCRD;
+ volatile uint32_t PUCRE;
+ volatile uint32_t PDCRE;
+ volatile uint32_t _reserved1[4];
+ volatile uint32_t PUCRH;
+ volatile uint32_t PDCRH;
+ volatile uint32_t _reserved2[8];
+ volatile uint32_t C2CR1;
+ volatile uint32_t C2CR3;
+ volatile uint32_t EXTSCR;
+};
+
+
+template <typename T>
+class STM32_PWR_t : public mmio_ptr<T> {
+ public:
+ using mmio_ptr<T>::ptr;
+};
+
+// TODO - methods for pullup/pulldowns?
+