Skip to content
Snippets Groups Projects
Commit 015098d2 authored by Joakim Nohlgård's avatar Joakim Nohlgård
Browse files

kinetis: timer: return error if timer channel is not zero.

parent 5e2b4b6b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment