diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2017-01-21 14:55:27 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2017-01-21 14:55:27 +0000 |
commit | 68c89856c1fc310ad0d75ae1df9d000704e87c8a (patch) | |
tree | aa60906eb89e33f967d51fa304600f44dd684cdc /reg/pmc.h | |
download | mk20dx256-68c89856c1fc310ad0d75ae1df9d000704e87c8a.tar.gz mk20dx256-68c89856c1fc310ad0d75ae1df9d000704e87c8a.tar.xz mk20dx256-68c89856c1fc310ad0d75ae1df9d000704e87c8a.zip |
Init commit
Diffstat (limited to 'reg/pmc.h')
-rw-r--r-- | reg/pmc.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/reg/pmc.h b/reg/pmc.h new file mode 100644 index 0000000..4aef0be --- /dev/null +++ b/reg/pmc.h @@ -0,0 +1,27 @@ +#ifndef LIB_REG_PMC_H +#define LIB_REG_PMC_H + +#include <reg/regdefs.h> + +#define PMC_LVDSC1 REG_8(0x4007D000) /* Low Voltage Detect Status And Control 1 register */ +#define LVDSC1_LVDF 7 /* Low-Voltage Detect Flag */ +#define LVDSC1_LVDACK 6 /* Low-Voltage Detect Acknowledge */ +#define LVDSC1_LVDIE 5 /* Low-Voltage Detect Interrupt Enable */ +#define LVDSC1_LVDRE 4 /* Low-Voltage Detect Reset Enable */ +#define LVDSC1_LVDV 0 /* Low-Voltage Detect Voltage Select */ +#define LVDSC1_LVDV_M (uint8_t)(BITS(2) << LVDSC1_LVDV) + +#define PMC_LVDSC2 REG_8(0x4007D001) /* Low Voltage Detect Status And Control 2 register */ +#define LVDSC2_LVWF 7 /* Low-Voltage Warning Flag */ +#define LVDSC2_LVWACK 6 /* Low-Voltage Warning Acknowledge */ +#define LVDSC2_LVWIE 5 /* Low-Voltage Warning Interrupt Enable */ +#define LVDSC2_LVWV 0 /* Low-Voltage Warning Voltage Select */ +#define LVDSC2_LVWV_M (uint8_t)(BITS(2) << LVDSC2_LVWV) + +#define PMC_REGSC REG_8(0x4007D002) /* Regulator Status And Control register */ +#define REGSC_BGEN 4 /* Bandgap Enable In VLPx Operation */ +#define REGSC_ACKISO 3 /* Acknowledge Isolation */ +#define REGSC_REGONS 2 /* Regulator In Run Regulation Status */ +#define REGSC_BGBE 1 /* Bandgap Buffer Enable */ + +#endif /* LIB_REG_PMC_H */ |