summaryrefslogtreecommitdiff
path: root/pwr/pwr.h
blob: 15ff8d25449188e1528f534152c36c2e374f7be9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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