Skip to content
Snippets Groups Projects
Commit 026503d2 authored by Hauke Petersen's avatar Hauke Petersen
Browse files

Merge pull request #3952 from gebart/pr/kinetis-timer-channel-return

kinetis: timer: return error if timer channel is not zero.
parents 7cb3f9bd 015098d2
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) ...@@ -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) 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) { switch (dev) {
#if TIMER_0_EN #if TIMER_0_EN
...@@ -180,7 +183,10 @@ int timer_set_absolute(tim_t dev, int channel, unsigned int value) ...@@ -180,7 +183,10 @@ int timer_set_absolute(tim_t dev, int channel, unsigned int value)
int timer_clear(tim_t dev, int channel) 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) { switch (dev) {
#if TIMER_0_EN #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