diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-08-02 13:48:35 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-08-02 14:36:04 -0400 |
commit | 34945d78e933fc62bedcc975e88be02a0b7fcc2e (patch) | |
tree | 317edc18fe08d76a1f5d8c3aabf88cf58ba73897 /Sensor Watch Starter Project/app.h | |
parent | 2d1e2e8c76623543817f4c62b26fc300c1fd0d2c (diff) | |
download | Sensor-Watch-34945d78e933fc62bedcc975e88be02a0b7fcc2e.tar.gz Sensor-Watch-34945d78e933fc62bedcc975e88be02a0b7fcc2e.tar.bz2 Sensor-Watch-34945d78e933fc62bedcc975e88be02a0b7fcc2e.zip |
major project reorg, move library one level up
Diffstat (limited to 'Sensor Watch Starter Project/app.h')
-rw-r--r-- | Sensor Watch Starter Project/app.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Sensor Watch Starter Project/app.h b/Sensor Watch Starter Project/app.h new file mode 100644 index 00000000..b025725c --- /dev/null +++ b/Sensor Watch Starter Project/app.h @@ -0,0 +1,29 @@ +/** + * Header file for Sensor Watch application + * + * Ideally you should implement your app entirely within these functions, as well as any + * interrupt callbacks you register with the watch API. The general flow is as follows: + * + * 1. main.c configures the watch + * 2. main.c calls your app_init() function. + * - You may wish to enable some functionality and peripherals here. + * - You should definitely set up some wake-up sources here. + * 3. main.c calls your app_loop() function. + * - Run code and update your UI here. + * 4. main.c calls your app_prepare_for_sleep() function. + * - Consider resetting any state that was set in your wakeup callback here. + * - You may also want to disable / depower external sensors or peripherals here. + * 5. main.c enters the STANDBY sleep mode. + * - No user code will run, and the watch will enter a low power mode. + * - The watch will remain in this state until something from (2) wakes it. + * 6. main.c calls your app_wake_from_sleep() function. + * - You may wish to re-enable any peripherals you disabled. + * - After this, execution resumes at step (3). + */ + +#include "watch.h" + +void app_init(); +void app_loop(); +void app_prepare_for_sleep(); +void app_wake_from_sleep(); |