summaryrefslogtreecommitdiffstats
path: root/movement/template/template.c
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2022-01-26 20:36:49 -0500
committerJoey Castillo <joeycastillo@utexas.edu>2022-01-26 20:36:49 -0500
commitfe5a3eecff0ca2fcaf5ac5eb00a8aa50b5064ece (patch)
tree7883e3f9a51eb8587f227b9ebe09d6554e989084 /movement/template/template.c
parentf036d6a515b73400e7ea6dea09dfaf2a1ad0080a (diff)
parent5d5e5b125a383174f1891d37498415cc10fe84fe (diff)
downloadSensor-Watch-fe5a3eecff0ca2fcaf5ac5eb00a8aa50b5064ece.tar.gz
Sensor-Watch-fe5a3eecff0ca2fcaf5ac5eb00a8aa50b5064ece.tar.bz2
Sensor-Watch-fe5a3eecff0ca2fcaf5ac5eb00a8aa50b5064ece.zip
Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into main
Diffstat (limited to 'movement/template/template.c')
-rw-r--r--movement/template/template.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/movement/template/template.c b/movement/template/template.c
index 3f60be97..c9c174b6 100644
--- a/movement/template/template.c
+++ b/movement/template/template.c
@@ -22,13 +22,15 @@
* SOFTWARE.
*/
+#include <stdlib.h>
+#include <string.h>
#include "<#watch_face_name#>_face.h"
void <#watch_face_name#>_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr) {
(void) settings;
if (*context_ptr == NULL) {
*context_ptr = malloc(sizeof(<#watch_face_name#>_state_t));
- memset(*context_ptr, 0, sizeof(<#watch_face_name#>));
+ memset(*context_ptr, 0, sizeof(<#watch_face_name#>_state_t));
// Do any one-time tasks in here; the inside of this conditional happens only at boot.
}
// Do any pin or peripheral setup here; this will be called whenever the watch wakes from deep sleep.
@@ -76,7 +78,7 @@ bool <#watch_face_name#>_face_loop(movement_event_t event, movement_settings_t *
break;
}
- // return true if the watch can enter standby mode. If you are PWM'ing an LED or buzzing the buzzer nere,
+ // return true if the watch can enter standby mode. If you are PWM'ing an LED or buzzing the buzzer here,
// you should return false since the PWM driver does not operate in standby mode.
return true;
}
@@ -87,3 +89,4 @@ void <#watch_face_name#>_face_resign(movement_settings_t *settings, void *contex
// handle any cleanup before your watch face goes off-screen.
}
+