mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 19:20:30 +08:00
faces/totp: define TOTP data array size function
Computes the size of the array of TOTP records. The compiler will likely evaluate it at compile time.
This commit is contained in:
parent
a99f6a716f
commit
48e7fb1a7c
|
@ -65,6 +65,10 @@ static totp_t totp_data[] = {
|
|||
// END OF KEY DATA.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static inline size_t _totp_num(void) {
|
||||
return sizeof(totp_data) / sizeof(*totp_data);
|
||||
}
|
||||
|
||||
static void _update_display(totp_state_t *totp_state) {
|
||||
char buf[14];
|
||||
div_t result;
|
||||
|
|
Loading…
Reference in a new issue