From 2b46a0fddede86778378cc930bed6d836fff6a97 Mon Sep 17 00:00:00 2001 From: Anthony Merlino Date: Mon, 12 Apr 2021 15:14:10 -0400 Subject: [PATCH] stm32h7: Adds guards around stm32_iocompensation. --- arch/arm/src/stm32h7/stm32_gpio.c | 2 ++ arch/arm/src/stm32h7/stm32_gpio.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/src/stm32h7/stm32_gpio.c b/arch/arm/src/stm32h7/stm32_gpio.c index b1974bc7571..f2da8fdcdb0 100644 --- a/arch/arm/src/stm32h7/stm32_gpio.c +++ b/arch/arm/src/stm32h7/stm32_gpio.c @@ -472,6 +472,7 @@ bool stm32_gpioread(uint32_t pinset) * ****************************************************************************/ +#ifdef CONFIG_STM32H7_SYSCFG_IOCOMPENSATION void stm32_iocompensation(void) { /* Enable I/O Compensation. Writing '1' to the CMPCR power-down bit @@ -486,5 +487,6 @@ void stm32_iocompensation(void) { } } +#endif #endif /* CONFIG_STM32H7_STM32H7X3XX || CONFIG_STM32H7_STM32H7X7XX */ diff --git a/arch/arm/src/stm32h7/stm32_gpio.h b/arch/arm/src/stm32h7/stm32_gpio.h index 4750f18fc5f..eaa39e9fe74 100644 --- a/arch/arm/src/stm32h7/stm32_gpio.h +++ b/arch/arm/src/stm32h7/stm32_gpio.h @@ -348,7 +348,9 @@ bool stm32_gpioread(uint32_t pinset); * ****************************************************************************/ +#ifdef CONFIG_STM32H7_SYSCFG_IOCOMPENSATION void stm32_iocompensation(void); +#endif /**************************************************************************** * Name: stm32_gpiosetevent