summaryrefslogtreecommitdiff
path: root/pwr/pwr.h
diff options
context:
space:
mode:
Diffstat (limited to 'pwr/pwr.h')
-rw-r--r--pwr/pwr.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/pwr/pwr.h b/pwr/pwr.h
new file mode 100644
index 0000000..15ff8d2
--- /dev/null
+++ b/pwr/pwr.h
@@ -0,0 +1,30 @@
+#ifndef PWR_H
+#define PWR_H
+
+#include <stdint.h>
+
+#if defined(STM32WB)
+
+struct PWR_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;
+ struct {
+ volatile uint32_t PU;
+ volatile uint32_t PD;
+ } PCR[12];
+ volatile uint32_t C2CR1;
+ volatile uint32_t C2CR2;
+ volatile uint32_t EXTSCR;
+};
+
+static PWR_t& PWR = *(PWR_t*)0x58000400;
+
+#endif
+
+#endif