Fixed warning

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7025 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
utzig 2014-07-09 01:29:01 +00:00
parent fa74e80323
commit 9607cf96b0
1 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,7 @@ static void config_channel(volatile uint8_t *tccra,
static uint8_t timer_index(PWMDriver *pwmp) static uint8_t timer_index(PWMDriver *pwmp)
{ {
uint8_t index = 0; uint8_t index = 0;
#if AVR_PWM_USE_TIM1 || defined(__DOXYGEN__) #if AVR_PWM_USE_TIM1 || defined(__DOXYGEN__)
if (pwmp == &PWMD1) return index; if (pwmp == &PWMD1) return index;
else index++; else index++;
@ -135,6 +136,9 @@ static uint8_t timer_index(PWMDriver *pwmp)
if (pwmp == &PWMD5) return index; if (pwmp == &PWMD5) return index;
else index++; else index++;
#endif #endif
/* This is an error! */
return index;
} }
/*===========================================================================*/ /*===========================================================================*/