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:
parent
4a2d867339
commit
527c429f5f
@ -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 */
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user