mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/lpc1768: adapt timer to return 0 on success
Adapt periph/timer implementation of lpc1768 based MCUs to return 0 on success for all functions.
This commit is contained in:
parent
fd900357fc
commit
ddcbfce391
@ -83,7 +83,7 @@ int timer_set_absolute(tim_t dev, int channel, unsigned int value)
|
||||
return -1;
|
||||
}
|
||||
TIMER_0_DEV->MCR |= (1 << (channel * 3));
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -92,7 +92,7 @@ int timer_clear(tim_t dev, int channel)
|
||||
{
|
||||
if (dev == TIMER_0 && channel >= 0 && channel < TIMER_0_CHANNELS) {
|
||||
TIMER_0_DEV->MCR &= ~(1 << (channel * 3));
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user