summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2023-02-28 16:57:40 +0100
committerDamien George <damien@micropython.org>2023-03-01 10:05:04 +1100
commit4937174b43616f2f85128c1764bde131d39643f3 (patch)
treec6951a224c961fee9a38df4529da846ea07a37f9
parent36ae5d3e87c3a3ab46a36c029c77722390db47b0 (diff)
stm32/cyw43_configport: Fix build for boards without an RF switch.
Check if an RF switch is enabled before defining the RF switch pin.
-rw-r--r--ports/stm32/cyw43_configport.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ports/stm32/cyw43_configport.h b/ports/stm32/cyw43_configport.h
index 666dfc43e..9ad932509 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);