From 4937174b43616f2f85128c1764bde131d39643f3 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Tue, 28 Feb 2023 16:57:40 +0100 Subject: [PATCH] stm32/cyw43_configport: Fix build for boards without an RF switch. Check if an RF switch is enabled before defining the RF switch pin. --- ports/stm32/cyw43_configport.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/stm32/cyw43_configport.h b/ports/stm32/cyw43_configport.h index 666dfc43e2..9ad932509d 100644 --- a/ports/stm32/cyw43_configport.h +++ b/ports/stm32/cyw43_configport.h @@ -85,9 +85,12 @@ #define CYW43_PIN_WL_REG_ON pyb_pin_WL_REG_ON #define CYW43_PIN_WL_HOST_WAKE pyb_pin_WL_HOST_WAKE -#define CYW43_PIN_WL_RFSW_VDD pyb_pin_WL_RFSW_VDD #define CYW43_PIN_WL_SDIO_1 pyb_pin_WL_SDIO_1 +#if MICROPY_HW_ENABLE_RF_SWITCH +#define CYW43_PIN_WL_RFSW_VDD pyb_pin_WL_RFSW_VDD +#endif + #define cyw43_schedule_internal_poll_dispatch(func) pendsv_schedule_dispatch(PENDSV_DISPATCH_CYW43, func) void cyw43_post_poll_hook(void);