From d2e43d132c6e0e4ca7bc9a5835135d9a205829b7 Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Mon, 2 Aug 2021 17:34:35 -0400 Subject: move app.h to library, no need for user to change it --- Sensor Watch Starter Project/app.h | 33 --------------------------------- watch-library/app.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 Sensor Watch Starter Project/app.h create mode 100644 watch-library/app.h diff --git a/Sensor Watch Starter Project/app.h b/Sensor Watch Starter Project/app.h deleted file mode 100644 index df40a30f..00000000 --- a/Sensor Watch Starter Project/app.h +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Header file for Sensor Watch application - * - * You should be able to write a watch app by simply implementing these functions - * and declaring callbacks for various GPIO and peripheral interrupts. The main.c - * file takes care of calling these functions for you. The general flow: - * - * 1. Your app_init() function is called. - * - This method should only be used to set your initial application state. - * 2. If your app is waking from BACKUP, app_wake_from_deep_sleep() is called. - * - If you saved state in the RTC's backup registers, you can restore it here. - * 3. Your app_setup() method is called. - * - You may wish to enable some functionality and peripherals here. - * - You should definitely set up some interrupts here. - * 4. The main run loop begins: your app_loop() function is called. - * - Run code and update your UI here. - * - Return true if your app is prepared to enter STANDBY mode. - * 5. This step differs depending on the value returned by app_loop: - * - If you returned false, execution resumes at (4). - * - If you returned true, app_prepare_for_sleep() is called; execution moves on to (6). - * 6. The microcontroller 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 an interrupt wakes it. - * 7. Once woken from STANDBY, your app_wake_from_sleep() function is called. - * - After this, execution resumes at (4). - */ - -void app_init(); -void app_wake_from_deep_sleep(); -void app_setup(); -bool app_loop(); -void app_prepare_for_sleep(); -void app_wake_from_sleep(); diff --git a/watch-library/app.h b/watch-library/app.h new file mode 100644 index 00000000..df40a30f --- /dev/null +++ b/watch-library/app.h @@ -0,0 +1,33 @@ +/** + * Header file for Sensor Watch application + * + * You should be able to write a watch app by simply implementing these functions + * and declaring callbacks for various GPIO and peripheral interrupts. The main.c + * file takes care of calling these functions for you. The general flow: + * + * 1. Your app_init() function is called. + * - This method should only be used to set your initial application state. + * 2. If your app is waking from BACKUP, app_wake_from_deep_sleep() is called. + * - If you saved state in the RTC's backup registers, you can restore it here. + * 3. Your app_setup() method is called. + * - You may wish to enable some functionality and peripherals here. + * - You should definitely set up some interrupts here. + * 4. The main run loop begins: your app_loop() function is called. + * - Run code and update your UI here. + * - Return true if your app is prepared to enter STANDBY mode. + * 5. This step differs depending on the value returned by app_loop: + * - If you returned false, execution resumes at (4). + * - If you returned true, app_prepare_for_sleep() is called; execution moves on to (6). + * 6. The microcontroller 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 an interrupt wakes it. + * 7. Once woken from STANDBY, your app_wake_from_sleep() function is called. + * - After this, execution resumes at (4). + */ + +void app_init(); +void app_wake_from_deep_sleep(); +void app_setup(); +bool app_loop(); +void app_prepare_for_sleep(); +void app_wake_from_sleep(); -- cgit v1.2.3