50 port_module_enable(POWER_CONTROL_VPERIPH_PORT);
51 port_module_enable(POWER_CONTROL_VSEC_PORT);
52 port_module_enable(POWER_CONTROL_AVDD_PORT);
59 POWER_CONTROL_VPERIPH_PORT->PCR[POWER_CONTROL_VPERIPH_PIN_NUMBER] =
60 PORT_PCR_MUX(POWER_CONTROL_GPIO_MUX_NUMBER);
62 POWER_CONTROL_VPERIPH_GPIO->PDDR |= GPIO_PDDR_PDD(1 << POWER_CONTROL_VPERIPH_PIN_NUMBER);
67 POWER_CONTROL_VSEC_PORT->PCR[POWER_CONTROL_VSEC_PIN_NUMBER] =
68 PORT_PCR_MUX(POWER_CONTROL_GPIO_MUX_NUMBER);
70 POWER_CONTROL_VSEC_GPIO->PDDR |= GPIO_PDDR_PDD(1 << POWER_CONTROL_VSEC_PIN_NUMBER);
75 POWER_CONTROL_AVDD_PORT->PCR[POWER_CONTROL_AVDD_PIN_NUMBER] =
76 PORT_PCR_MUX(POWER_CONTROL_GPIO_MUX_NUMBER);
78 POWER_CONTROL_AVDD_GPIO->PDDR |= GPIO_PDDR_PDD(1 << POWER_CONTROL_AVDD_PIN_NUMBER);
82 power_control_vperiph_set(
bool state)
84 BITBAND_REG(POWER_CONTROL_VPERIPH_GPIO->PDOR, POWER_CONTROL_VPERIPH_PIN_NUMBER) = (state ? 1 : 0);
88 power_control_vsec_set(
bool state)
90 BITBAND_REG(POWER_CONTROL_VSEC_GPIO->PDOR, POWER_CONTROL_VSEC_PIN_NUMBER) = (state ? 1 : 0);
94 power_control_avdd_set(
bool state)
96 BITBAND_REG(POWER_CONTROL_AVDD_GPIO->PDOR, POWER_CONTROL_AVDD_PIN_NUMBER) = (state ? 1 : 0);
Power control pins for the on board power switches on the Mulle board.
Power control pins for the on board power switches on the Mulle board.
#define BITBAND_REG(Reg, Bit)
Macro to access a single bit of a peripheral register (bit band region 0x40000000 to 0x400FFFFF) usin...