diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-04-25 22:43:47 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-04-25 22:43:47 -0400 |
commit | efd1e8a1238af8eea53afa0d5acac071d73d1ea5 (patch) | |
tree | b64949c782f61f6a759a70f22fe32342c0dc0f27 /Smol Watch Project/My Project/sleep_manager_main.c | |
parent | 9dda14e554137e0b0ca02b61158b5580d0728332 (diff) | |
download | Sensor-Watch-efd1e8a1238af8eea53afa0d5acac071d73d1ea5.tar.gz Sensor-Watch-efd1e8a1238af8eea53afa0d5acac071d73d1ea5.tar.bz2 Sensor-Watch-efd1e8a1238af8eea53afa0d5acac071d73d1ea5.zip |
WIP simple C-based library for hacking on the watch
Diffstat (limited to 'Smol Watch Project/My Project/sleep_manager_main.c')
-rw-r--r-- | Smol Watch Project/My Project/sleep_manager_main.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Smol Watch Project/My Project/sleep_manager_main.c b/Smol Watch Project/My Project/sleep_manager_main.c new file mode 100644 index 00000000..2ffade91 --- /dev/null +++ b/Smol Watch Project/My Project/sleep_manager_main.c @@ -0,0 +1,24 @@ +/* + * Code generated from Atmel Start. + * + * This file will be overwritten when reconfiguring your Atmel Start project. + * Please copy examples or other code you want to keep to a separate file or main.c + * to avoid loosing it when reconfiguring. + */ +#include "atmel_start.h" +#include "sleep_manager_main.h" + +static struct sleepmgr_ready_to_sleep_cb sleepmgr_cb; + +static void sleep_cb(struct sleepmgr_ready_to_sleep *const ready) +{ + ready->ready = false; +} + +void sleep_manager_init(void) +{ + sleepmgr_init(); + + sleepmgr_cb.cb = sleep_cb; + sleepmgr_register_ready_to_sleep_callback(&sleepmgr_cb); +} |