SapFlow Probe
A low-cost HRM probe for measuring a tree's water consumption
|
#include "sleep.h"
Functions | |
void | alarmISR () |
Interrupt handler for RTC alarm. More... | |
void | feather_sleep (void) |
Maximizes power savings during sleep. More... | |
void | sleep_cycle (int interval) |
Sleep function for periodic sleeping. More... | |
void alarmISR | ( | void | ) |
Interrupt handler for RTC alarm.
Called when the feather wakes up from sleep. Disables the RTC interrupt.
References ALARM_PIN, and rtc_ds.
Referenced by feather_sleep().
void feather_sleep | ( | void | ) |
Maximizes power savings during sleep.
References ALARM_PIN, alarmISR(), hardware_deinit(), and hardware_init().
Referenced by sleep_cycle().
void sleep_cycle | ( | int | interval = 5 | ) |
Sleep function for periodic sleeping.
Sleep until the time is a round multiple of the minute inteval. Produces unexpected bevahior for non-factors of 60 (7, 8, 9, 11, etc). For example, if it's 5:39 and you select an interval of 15, the microcontroller will wake up at 5:45, since 3*15 = 45. This function internally calls feather_sleep() to handle prep and resume from sleeping
interval | The increment to sleep for. |
References feather_sleep(), and rtc_ds.
Referenced by schedule().