faces/totp: define current TOTP data function

Selects the appropriate TOTP data structure
given the TOTP watch face state.
This commit is contained in:
Matheus Afonso Martins Moreira 2024-02-20 23:18:00 -03:00
parent 48e7fb1a7c
commit bbb920a5d8

View File

@ -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);
}