From: Matheus Afonso Martins Moreira Date: Wed, 21 Feb 2024 02:18:00 +0000 (-0300) Subject: faces/totp: define current TOTP data function X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=bbb920a5d81f04e55dac3dbc2b9034fde22c7e4c;p=sensor-watch.git faces/totp: define current TOTP data function Selects the appropriate TOTP data structure given the TOTP watch face state. --- diff --git a/movement/watch_faces/complication/totp_face.c b/movement/watch_faces/complication/totp_face.c index 4ab77c3..8af5fbc 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); }