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

@@ -16,6 +16,7 @@ INCLUDES += \
-I../watch_faces/complications/ \
-I../watch_faces/thermistor/ \
-I../watch_faces/demos/ \
-I../lib/TOTP-MCU/ \
# If you add any other source files you wish to compile, add them after ../app.c
# Note that you will need to add a backslash at the end of any line you wish to continue, i.e.
@@ -24,6 +25,8 @@ INCLUDES += \
# ../drivers/lis2dh.c \
# ../watch_faces/fitness/step_count_face.c
SRCS += \
../lib/TOTP-MCU/sha1.c \
../lib/TOTP-MCU/TOTP.c \
../movement.c \
../watch_faces/clock/simple_clock_face.c \
../watch_faces/settings/preferences_face.c \
@@ -37,6 +40,7 @@ SRCS += \
../watch_faces/complications/beats_face.c \
../watch_faces/complications/day_one_face.c \
../watch_faces/complications/stopwatch_face.c \
../watch_faces/complications/totp_face.c \
# Leave this line at the bottom of the file; it has all the targets for making your project.
include $(TOP)/rules.mk