mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 06:53:52 +01:00
kinetis: timer: return error if timer channel is not zero.
This commit is contained in:
parent
5e2b4b6b23
commit
015098d2c2
@ -144,7 +144,10 @@ int timer_set(tim_t dev, int channel, unsigned int timeout)
|
||||
|
||||
int timer_set_absolute(tim_t dev, int channel, unsigned int value)
|
||||
{
|
||||
(void) channel; /* we only support one channel */
|
||||
/* we only support one channel */
|
||||
if (channel != 0) {
|
||||
return -1;
|
||||
}
|
||||
switch (dev) {
|
||||
#if TIMER_0_EN
|
||||
|
||||
@ -180,7 +183,10 @@ int timer_set_absolute(tim_t dev, int channel, unsigned int value)
|
||||
|
||||
int timer_clear(tim_t dev, int channel)
|
||||
{
|
||||
(void) channel; /* we only support one channel */
|
||||
/* we only support one channel */
|
||||
if (channel != 0) {
|
||||
return -1;
|
||||
}
|
||||
switch (dev) {
|
||||
#if TIMER_0_EN
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user