From eecae8fd96b2538488230543b15a4a06ee39ee3e Mon Sep 17 00:00:00 2001 From: lenvm Date: Wed, 18 Oct 2023 12:21:46 +0200 Subject: [PATCH] platforms/common-stm32: fix for adc_start_conversion_direct only being defined for STM32F1, and not for STM32F4 --- src/platforms/common/stm32/timing_stm32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/common/stm32/timing_stm32.c b/src/platforms/common/stm32/timing_stm32.c index 9a94364bc76..d9bc5bcca40 100644 --- a/src/platforms/common/stm32/timing_stm32.c +++ b/src/platforms/common/stm32/timing_stm32.c @@ -33,7 +33,7 @@ static volatile uint32_t time_ms = 0; uint32_t target_clk_divider = 0; static size_t morse_tick = 0; -#ifdef PLATFORM_HAS_POWER_SWITCH +#if defined(PLATFORM_HAS_POWER_SWITCH) && defined(STM32F1) static uint8_t monitor_ticks = 0; /* Derived from calculating (1.2V / 3.0V) * 4096 */ @@ -90,7 +90,7 @@ void sys_tick_handler(void) } else ++morse_tick; -#ifdef PLATFORM_HAS_POWER_SWITCH +#if defined(PLATFORM_HAS_POWER_SWITCH) && defined(STM32F1) /* First check if target power is presently enabled */ if (platform_target_get_power()) { /*