mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
sys/xtimer: assert() successful initialized
Use an `assert()` to make sure that `periph_timer` was successfully initialized.
This commit is contained in:
parent
4243c180cb
commit
6deb89f887
@ -31,6 +31,7 @@
|
||||
#include "periph_conf.h"
|
||||
#endif
|
||||
|
||||
#include "assert.h"
|
||||
#include "xtimer.h"
|
||||
#include "irq.h"
|
||||
|
||||
@ -65,7 +66,9 @@ void xtimer_init(void)
|
||||
{
|
||||
#ifndef MODULE_XTIMER_ON_ZTIMER
|
||||
/* initialize low-level timer */
|
||||
timer_init(XTIMER_DEV, XTIMER_HZ, _periph_timer_callback, NULL);
|
||||
int ret = timer_init(XTIMER_DEV, XTIMER_HZ, _periph_timer_callback, NULL);
|
||||
(void)ret;
|
||||
assert(ret == 0);
|
||||
#endif
|
||||
|
||||
/* register initial overflow tick */
|
||||
|
Loading…
Reference in New Issue
Block a user