diff options
author | Anton Staaf <robotboy@chromium.org> | 2015-06-29 14:49:59 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-30 17:19:04 +0000 |
commit | dd9e4fa427d106a716534cf85da4c27a0e932957 (patch) | |
tree | ce80a6b336367d769c3d730cdd85112f59d07951 /chip | |
parent | ebdad6b0f2918ba4eae3f897d6c4a342a70a4b48 (diff) | |
download | chrome-ec-dd9e4fa427d106a716534cf85da4c27a0e932957.tar.gz |
STM32 PWM: Add error case in conditional compilation
Ensure that a new chip doesn't default to one of the possible
alternate function selection schemes, requiring it to pick one
or implement something new.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Change-Id: I3650fa0c99bbf541039a778f4d6398f0a549f1b2
Reviewed-on: https://chromium-review.googlesource.com/282601
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
Trybot-Ready: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/stm32/pwm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chip/stm32/pwm.c b/chip/stm32/pwm.c index c25dd2330e..577e984498 100644 --- a/chip/stm32/pwm.c +++ b/chip/stm32/pwm.c @@ -44,9 +44,11 @@ static void pwm_configure(enum pwm_channel ch) #if defined(CHIP_FAMILY_STM32F0) || defined(CHIP_FAMILY_STM32F3) gpio_set_alternate_function(gpio->port, gpio->mask, pwm->gpio_alt_func); -#else /* stm32l */ +#elif defined(CHIP_FAMILY_STM32L) gpio_set_alternate_function(gpio->port, gpio->mask, GPIO_ALT_TIM(pwm->tim.id)); +#else +#error "GPIO alternate function selection not implemented for chip family." #endif /* Enable timer */ |