diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2022-01-25 17:04:07 -0500 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2022-01-25 17:04:07 -0500 |
commit | 2e345d9f664e83ef88e889f7fc6e74a700dafd31 (patch) | |
tree | 3ac24ea6e1facad9be32bff888f0b6acef6d2303 /movement/watch_faces/complication/totp_face.h | |
parent | fcfb651c113f30d0884f431e8674878077044d03 (diff) | |
download | Sensor-Watch-2e345d9f664e83ef88e889f7fc6e74a700dafd31.tar.gz Sensor-Watch-2e345d9f664e83ef88e889f7fc6e74a700dafd31.tar.bz2 Sensor-Watch-2e345d9f664e83ef88e889f7fc6e74a700dafd31.zip |
movement: slight reorganization
Diffstat (limited to 'movement/watch_faces/complication/totp_face.h')
-rw-r--r-- | movement/watch_faces/complication/totp_face.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/movement/watch_faces/complication/totp_face.h b/movement/watch_faces/complication/totp_face.h new file mode 100644 index 00000000..dfa4a6d0 --- /dev/null +++ b/movement/watch_faces/complication/totp_face.h @@ -0,0 +1,26 @@ +#ifndef TOTP_FACE_H_ +#define TOTP_FACE_H_ + +#include "movement.h" + +typedef struct { + uint32_t timestamp; + uint8_t steps; + uint32_t current_code; + +} totp_state_t; + +void totp_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr); +void totp_face_activate(movement_settings_t *settings, void *context); +bool totp_face_loop(movement_event_t event, movement_settings_t *settings, void *context); +void totp_face_resign(movement_settings_t *settings, void *context); + +#define totp_face ((const watch_face_t){ \ + totp_face_setup, \ + totp_face_activate, \ + totp_face_loop, \ + totp_face_resign, \ + NULL, \ +}) + +#endif // TOTP_FACE_H_ |