pm_layered.h

Layered low power mode infrastructure.

PROVIDES_PM_OFF
PROVIDES_PM_SET_LOWEST
void pm_block(unsigned mode)

Block a power mode.

Parameters

mode:power mode to block

void pm_unblock(unsigned mode)

Unblock a power mode.

Parameters

mode:power mode to unblock

void pm_set(unsigned mode)

Switches the MCU to a new power mode.

This function will be called by pm.h::pm_set_lowest() after determining the lowest non-blocked mode.

It needs to be implemented for each MCU using this module.

Parameters

mode:Target power mode