diff options
author | David Keck <davidskeck@fastmail.com> | 2022-01-26 18:59:48 -0500 |
---|---|---|
committer | David Keck <davidskeck@fastmail.com> | 2022-01-26 18:59:48 -0500 |
commit | 23610430b31bce8e147080d9a9d660b98e28b418 (patch) | |
tree | ec0b0e47280d885a8c8b2540174d07dee101f5f6 /movement/template/template.c | |
parent | 725f17bfb60e402dc0efc2e58cdcfc592ed5ff45 (diff) | |
download | Sensor-Watch-23610430b31bce8e147080d9a9d660b98e28b418.tar.gz Sensor-Watch-23610430b31bce8e147080d9a9d660b98e28b418.tar.bz2 Sensor-Watch-23610430b31bce8e147080d9a9d660b98e28b418.zip |
Added rough draft of watch_face script to generate custom watch faces from template. Corrected template file's missing includes and incorrect memset placeholder.
Diffstat (limited to 'movement/template/template.c')
-rw-r--r-- | movement/template/template.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/movement/template/template.c b/movement/template/template.c index 3f60be97..34c6dbf5 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. |