From 57ea4b419e1a23f41c34f4024fef7d13de5fcb09 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Sat, 21 Dec 2019 15:16:35 +0100 Subject: [PATCH] Fix build issue when TIM module is disabled or only requested Fix #839 Signed-off-by: Frederic Pillon --- cores/arduino/stm32/analog.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cores/arduino/stm32/analog.h b/cores/arduino/stm32/analog.h index 4ae2edd33b..dc459a845c 100644 --- a/cores/arduino/stm32/analog.h +++ b/cores/arduino/stm32/analog.h @@ -52,8 +52,10 @@ extern "C" { void dac_write_value(PinName pin, uint32_t value, uint8_t do_init); void dac_stop(PinName pin); uint16_t adc_read_value(PinName pin, uint32_t resolution); +#if defined(HAL_TIM_MODULE_ENABLED) && !defined(HAL_TIM_MODULE_ONLY) void pwm_start(PinName pin, uint32_t clock_freq, uint32_t value, TimerCompareFormat_t resolution); void pwm_stop(PinName pin); +#endif uint32_t get_pwm_channel(PinName pin); #ifdef __cplusplus