25 #ifndef LIBMIRA_SLEEP_H_ 26 #define LIBMIRA_SLEEP_H_ 28 #include "sys/process.h" 67 #define mira_deep_sleep(sleep_time) \ 69 mira_prepare_sleep(sleep_time); \ 70 PROCESS_WAIT_EVENT_UNTIL(ev == mira_wake_up_event); \ 71 mira_restore_from_sleep(); \ 113 #define mira_sleepy_node_poll_firmware(firmware_image_id) \ 115 mira_sleepy_node_poll_for_fw(firmware_image_id); \ 116 PROCESS_WAIT_UNTIL(mira_sleepy_node_poll_done()); \ uint8_t mira_sleepy_node_poll_done(void)
Checks if firmware polling is done.
process_event_t mira_wake_up_event
Event that gets sent to wake up the sleeping thread.
void mira_wake_up_process(void)
Wake up the thread that went to deep sleep.
void mira_prepare_sleep(uint16_t sleep_time)
Prepare for sleep.
void mira_restore_from_sleep(void)
Restore from sleep.
void mira_sleepy_node_poll_for_fw(uint16_t firmware_image_id)
Polls neighbors for new firmware.