aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-09 01:29:01 +0000
committerutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-09 01:29:01 +0000
commit9607cf96b0f4278f4c268e48e70d17bf641f8233 (patch)
tree51c8cefb5631d2ceaaf5624b31a1e1e61e50b735
parentfa74e803236f063b800f58480e3a1dbdf2344957 (diff)
downloadChibiOS-9607cf96b0f4278f4c268e48e70d17bf641f8233.tar.gz
ChibiOS-9607cf96b0f4278f4c268e48e70d17bf641f8233.tar.bz2
ChibiOS-9607cf96b0f4278f4c268e48e70d17bf641f8233.zip
Fixed warning
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7025 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/ports/AVR/pwm_lld.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/ports/AVR/pwm_lld.c b/os/hal/ports/AVR/pwm_lld.c
index 44454d502..450d57b78 100644
--- a/os/hal/ports/AVR/pwm_lld.c
+++ b/os/hal/ports/AVR/pwm_lld.c
@@ -115,6 +115,7 @@ static void config_channel(volatile uint8_t *tccra,
static uint8_t timer_index(PWMDriver *pwmp)
{
uint8_t index = 0;
+
#if AVR_PWM_USE_TIM1 || defined(__DOXYGEN__)
if (pwmp == &PWMD1) return index;
else index++;
@@ -135,6 +136,9 @@ static uint8_t timer_index(PWMDriver *pwmp)
if (pwmp == &PWMD5) return index;
else index++;
#endif
+
+ /* This is an error! */
+ return index;
}
/*===========================================================================*/