ArduinoLibs
|
Enumerations | |
enum | SleepDuration { SLEEP_15_MS, SLEEP_30_MS, SLEEP_60_MS, SLEEP_120_MS, SLEEP_250_MS, SLEEP_500_MS, SLEEP_1_SEC, SLEEP_2_SEC, SLEEP_4_SEC, SLEEP_8_SEC } |
Duration to put the CPU to sleep with sleepFor(). More... | |
Functions | |
void | sleepFor (SleepDuration duration, uint8_t mode) |
Puts the CPU to sleep for a specific duration.The analog to digital converter and the brown out detector will be disabled during sleep mode. More... | |
void | unusedPin (uint8_t pin) |
Marks an I/O pin as unused.This function sets pin to be an input with pullups enabled, which will reduce power consumption compared to pins that are left floating. | |
The functions in this module assist with reducing power consumption on Arduino boards by disabling features that are not used or putting the device to sleep when it is inactive.
enum SleepDuration |
Duration to put the CPU to sleep with sleepFor().
Definition at line 38 of file PowerSave.h.
void sleepFor | ( | SleepDuration | duration, |
uint8_t | mode | ||
) |
Puts the CPU to sleep for a specific duration.The analog to digital converter and the brown out detector will be disabled during sleep mode.
The mode parameter indicates the mode to use when the device is sleeping. The default is SLEEP_MODE_IDLE.
Definition at line 132 of file PowerSave.cpp.