29 #if LZ_CONFIG_ON_IDLE_SLEEP && \ 30 ((LZ_CONFIG_AVR_SLEEP_WITH_IDLE_MODE + \ 31 LZ_CONFIG_AVR_SLEEP_WITH_ADC_NOISE_REDUCTION_MODE + \ 32 LZ_CONFIG_AVR_SLEEP_WITH_POWER_DOWN_MODE + \ 33 LZ_CONFIG_AVR_SLEEP_WITH_POWER_SAVE_MODE + \ 34 LZ_CONFIG_AVR_SLEEP_WITH_STANDBY_MODE + \ 35 LZ_CONFIG_AVR_SLEEP_WITH_EXTENDED_STANDBY_MODE) > 1) 36 #error "Idle mode for architecture AVR must be unique." void Arch_InitIdleCpuMode(void)
Initialize idle CPU modes.
const bool LZ_CONFIG_INSTRUMENT_CONTEXT_SWITCHES
When set, add instrumentation code to measure context switches.
#define DIRECT(X)
Define a direct read/write register at an absolute address.
const bool LZ_CONFIG_AVR_SLEEP_WITH_STANDBY_MODE
Enter "Standby Mode" when sleeping.
Include appropriate config file.
uint8_t LZ_CONFIG_AVR_INSTRUMENT_POSITION
The position in the port used for instrumentation on AVR machines.
#define SET_BITS(V, T, X)
Set the corresponding bits of X in the value V of type T.
#define SMCR
Sleep Mode Control Register.
void Arch_CpuSleep(void)
Put the CPU to sleep according to the sleep settings.
const bool LZ_CONFIG_AVR_SLEEP_WITH_ADC_NOISE_REDUCTION_MODE
Enter "ADC Noise Reduction Mode" when sleeping.
const bool LZ_CONFIG_AVR_SLEEP_WITH_EXTENDED_STANDBY_MODE
Enter "Extended Standby Mode" when sleeping.
void cpu_sleep(void)
Put the AVR CPU to sleep according to the sleep settings.
#define POSITION(X)
Define a constant bit at position X, starting from index 0.
void Arch_InitInstrumentation(void)
Initialize the context switch instrumentation.
unsigned char uint8_t
Represents a unsigned integer type with width of exactly 8 bits.
#define CLEAR_BITS(V, T, X)
Clear the corresponding bits of X in the value V of type T.
Header file specific to the AVR arch module.
const bool LZ_CONFIG_AVR_SLEEP_WITH_POWER_DOWN_MODE
Enter "Power-down Mode" when sleeping.
Basic type definitions and useful macros.
Architecture Abstraction API.
uint16_t LZ_CONFIG_AVR_INSTRUMENT_PORT
The port used for instrumentation on AVR machines.
const bool LZ_CONFIG_ON_IDLE_SLEEP
When 1, put the CPU to sleep when it's idle.
const bool LZ_CONFIG_AVR_SLEEP_WITH_POWER_SAVE_MODE
Enter "Power-save Mode" when sleeping.