summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-10-12 12:48:47 -0500
committerJeff Epler <jepler@gmail.com>2020-10-17 20:08:32 -0500
commitaa3c890ead4a006f273d6188a0a9fa2a19550458 (patch)
tree66e0295d5427d3c773e5ddd859fca8a818943cf8
parent396979a67e538da087136ce01dbc4c7a670bf60e (diff)
samd: pin: Fix 'undefined reference to pin_PA30'
.. when PA30 is IGNOREd
-rw-r--r--ports/atmel-samd/common-hal/microcontroller/Pin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/atmel-samd/common-hal/microcontroller/Pin.c b/ports/atmel-samd/common-hal/microcontroller/Pin.c
index bec9dc1e2..7dd87a3b2 100644
--- a/ports/atmel-samd/common-hal/microcontroller/Pin.c
+++ b/ports/atmel-samd/common-hal/microcontroller/Pin.c
@@ -223,9 +223,11 @@ bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t* pin) {
#ifdef MICROPY_HW_NEOPIXEL
if (pin == MICROPY_HW_NEOPIXEL) {
// Special case for Metro M0 where the NeoPixel is also SWCLK
+#ifndef IGNORE_PIN_PA30
if (MICROPY_HW_NEOPIXEL == &pin_PA30 && DSU->STATUSB.bit.DBGPRES == 1) {
return false;
}
+#endif
return !neopixel_in_use;
}
#endif