Fix non-CYW43 RP2040 builds

This commit is contained in:
Scott Shawcroft 2023-10-13 14:01:40 -07:00
parent db4253e268
commit 732caedd16
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
1 changed files with 9 additions and 5 deletions

View File

@ -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/<board>/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);