From 732caedd163e347d23a540014bd70445fa3ad962 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 13 Oct 2023 14:01:40 -0700 Subject: [PATCH] Fix non-CYW43 RP2040 builds --- ports/raspberrypi/peripherals/pins.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ports/raspberrypi/peripherals/pins.c b/ports/raspberrypi/peripherals/pins.c index 3b21d3f08c..647f571cb5 100644 --- a/ports/raspberrypi/peripherals/pins.c +++ b/ports/raspberrypi/peripherals/pins.c @@ -27,19 +27,23 @@ #include "pins.h" #include "shared-bindings/microcontroller/Pin.h" + +#if CIRCUITPY_CYW43 #include "bindings/cyw43/__init__.h" +#define CYW_PIN(p_number) \ + const mcu_pin_obj_t pin_CYW##p_number = { \ + { &cyw43_pin_type }, \ + .number = p_number \ + } +#endif + // This macro is used to simplify pin definition in boards//pins.c #define PIN(p_number) \ const mcu_pin_obj_t pin_GPIO##p_number = { \ { &mcu_pin_type }, \ .number = p_number \ } -#define CYW_PIN(p_number) \ - const mcu_pin_obj_t pin_CYW##p_number = { \ - { &cyw43_pin_type }, \ - .number = p_number \ - } PIN(0); PIN(1);