31#ifdef LIBOPENCM3_PWR_H
33#ifndef LIBOPENCM3_PWR_COMMON_V1_H
34#define LIBOPENCM3_PWR_COMMON_V1_H
41#define PWR_CR MMIO32(POWER_CONTROL_BASE + 0x00)
44#define PWR_CSR MMIO32(POWER_CONTROL_BASE + 0x04)
51#define PWR_CR_DBP (1 << 8)
54#define PWR_CR_PLS_LSB 5
59#define PWR_CR_PLS_2V2 (0x0 << PWR_CR_PLS_LSB)
60#define PWR_CR_PLS_2V3 (0x1 << PWR_CR_PLS_LSB)
61#define PWR_CR_PLS_2V4 (0x2 << PWR_CR_PLS_LSB)
62#define PWR_CR_PLS_2V5 (0x3 << PWR_CR_PLS_LSB)
63#define PWR_CR_PLS_2V6 (0x4 << PWR_CR_PLS_LSB)
64#define PWR_CR_PLS_2V7 (0x5 << PWR_CR_PLS_LSB)
65#define PWR_CR_PLS_2V8 (0x6 << PWR_CR_PLS_LSB)
66#define PWR_CR_PLS_2V9 (0x7 << PWR_CR_PLS_LSB)
68#define PWR_CR_PLS_MASK (0x7 << PWR_CR_PLS_LSB)
71#define PWR_CR_PVDE (1 << 4)
74#define PWR_CR_CSBF (1 << 3)
77#define PWR_CR_CWUF (1 << 2)
80#define PWR_CR_PDDS (1 << 1)
83#define PWR_CR_LPDS (1 << 0)
90#define PWR_CSR_EWUP (1 << 8)
95#define PWR_CSR_PVDO (1 << 2)
98#define PWR_CSR_SBF (1 << 1)
101#define PWR_CSR_WUF (1 << 0)
129#warning "pwr_common_v1.h should not be included explicitly, only via pwr.h"
void pwr_set_standby_mode(void)
Set Standby Mode in Deep Sleep.
void pwr_enable_backup_domain_write_protect(void)
Re-enable Backup Domain Write Protection.
void pwr_disable_power_voltage_detect(void)
Disable Power Voltage Detector.
void pwr_voltage_regulator_on_in_stop(void)
Voltage Regulator On in Stop Mode.
void pwr_disable_backup_domain_write_protect(void)
Disable Backup Domain Write Protection.
void pwr_clear_wakeup_flag(void)
Clear the Wakeup Flag.
bool pwr_get_standby_flag(void)
Get Standby Flag.
void pwr_disable_wakeup_pin(void)
Release Wakeup Pin.
void pwr_voltage_regulator_low_power_in_stop(void)
Voltage Regulator Low Power in Stop Mode.
bool pwr_get_wakeup_flag(void)
Get Wakeup Flag.
void pwr_clear_standby_flag(void)
Clear the Standby Flag.
bool pwr_voltage_high(void)
Get Voltage Detector Output.
void pwr_enable_power_voltage_detect(uint32_t pvd_level)
Enable Power Voltage Detector.
void pwr_enable_wakeup_pin(void)
Enable Wakeup Pin.
void pwr_set_stop_mode(void)
Set Stop Mode in Deep Sleep.