faces/totp: define current TOTP data function
Selects the appropriate TOTP data structure given the TOTP watch face state.
This commit is contained in:
parent
48e7fb1a7c
commit
bbb920a5d8
@ -65,6 +65,10 @@ static totp_t totp_data[] = {
|
|||||||
// END OF KEY 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) {
|
static inline size_t _totp_num(void) {
|
||||||
return sizeof(totp_data) / sizeof(*totp_data);
|
return sizeof(totp_data) / sizeof(*totp_data);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user