diff options
author | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-02-20 23:18:00 -0300 |
---|---|---|
committer | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-02-20 23:18:00 -0300 |
commit | bbb920a5d81f04e55dac3dbc2b9034fde22c7e4c (patch) | |
tree | d0571d6a0d778569851144844c0f074c1f48cd43 | |
parent | 48e7fb1a7cd7e78c5ad2d8b3819425a05fa0c641 (diff) | |
download | Sensor-Watch-bbb920a5d81f04e55dac3dbc2b9034fde22c7e4c.tar.gz Sensor-Watch-bbb920a5d81f04e55dac3dbc2b9034fde22c7e4c.tar.bz2 Sensor-Watch-bbb920a5d81f04e55dac3dbc2b9034fde22c7e4c.zip |
faces/totp: define current TOTP data function
Selects the appropriate TOTP data structure
given the TOTP watch face state.
-rw-r--r-- | movement/watch_faces/complication/totp_face.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/movement/watch_faces/complication/totp_face.c b/movement/watch_faces/complication/totp_face.c index 4ab77c37..8af5fbc4 100644 --- a/movement/watch_faces/complication/totp_face.c +++ b/movement/watch_faces/complication/totp_face.c @@ -65,6 +65,10 @@ static totp_t totp_data[] = { // END OF KEY DATA. //////////////////////////////////////////////////////////////////////////////// +static inline totp_t *_totp_current(totp_state_t *totp_state) { + return &totp_data[totp_state->current_index]; +} + static inline size_t _totp_num(void) { return sizeof(totp_data) / sizeof(*totp_data); } |