cpu/native: Update timer_init to match API changes
This commit is contained in:
parent
d2b06d1923
commit
d24cdd7cde
@ -74,13 +74,16 @@ void native_isr_timer(void)
|
|||||||
_callback(0);
|
_callback(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int timer_init(tim_t dev, unsigned int ticks_per_us, void (*callback)(int))
|
int timer_init(tim_t dev, unsigned long freq, void (*callback)(int))
|
||||||
{
|
{
|
||||||
(void)ticks_per_us;
|
(void)freq;
|
||||||
DEBUG("%s\n", __func__);
|
DEBUG("%s\n", __func__);
|
||||||
if (dev >= TIMER_NUMOF) {
|
if (dev >= TIMER_NUMOF) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (freq != NATIVE_TIMER_SPEED) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* initialize time delta */
|
/* initialize time delta */
|
||||||
time_null = 0;
|
time_null = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user