1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/ztimer: Fix compilation without ztimer_extend

`ztimer_init_extend()` should only be defined when module `ztimer_extend` is
used, as otherwise the `struct` member `clock->max_value` is not available.
This commit is contained in:
Marian Buschsieweke 2020-08-19 07:02:19 +02:00
parent 4a2d867339
commit 527c429f5f
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -485,6 +485,7 @@ void ztimer_update_head_offset(ztimer_clock_t *clock);
*/
void ztimer_init(void);
#if defined(MODULE_ZTIMER_EXTEND) || defined(DOXYGEN)
/**
* @brief Initialize possible ztimer extension intermediate timer
*
@ -501,6 +502,7 @@ static inline void ztimer_init_extend(ztimer_clock_t *clock)
clock->ops->set(clock, clock->max_value >> 1);
}
}
#endif /* MODULE_ZTIMER_EXTEND */
/* default ztimer virtual devices */
/**