summaryrefslogtreecommitdiff
path: root/pwr/pwr.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2019-04-03 17:14:01 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2019-04-03 17:14:01 +0200
commit3c526f3d0b30e200462290651f7c6a5eb30710a2 (patch)
tree4fe3cb5fc237d5ce7cd761a1c8a5640d88f6d21a /pwr/pwr.h
parentd81982edb1c4abf9a38da742f81bb648ce6882c5 (diff)
Added STM32WB support.stm32wb
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