Add initial TOTP watch face impl

Vendor code from https://github.com/Netthaw/TOTP-MCU to do the
heavy lifting of computing SHA-1 and HMAC and the rest of TOTP

Also implement a date_time to unix timestamp method
This commit is contained in:
Wesley Ellis
2021-11-22 21:20:57 -05:00
parent 7817e6696e
commit b7ed9adb6c
5 changed files with 162 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#ifndef TOTP_FACE_H_
#define TOTP_FACE_H_
#include "movement.h"
void totp_face_setup(movement_settings_t *settings, 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);
static const watch_face_t totp_face = {
totp_face_setup,
totp_face_activate,
totp_face_loop,
totp_face_resign,
NULL
};
#endif // TOTP_FACE_H_