Skip to content

Commit c5e2e2a

Browse files
committed
samd: pin: Fix 'undefined reference to pin_PA30'
.. when PA30 is IGNOREd
1 parent 1c4ec6f commit c5e2e2a

File tree

1 file changed

+2
-0
lines changed
  • ports/atmel-samd/common-hal/microcontroller

1 file changed

+2
-0
lines changed

ports/atmel-samd/common-hal/microcontroller/Pin.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,11 @@ bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t* pin) {
223223
#ifdef MICROPY_HW_NEOPIXEL
224224
if (pin == MICROPY_HW_NEOPIXEL) {
225225
// Special case for Metro M0 where the NeoPixel is also SWCLK
226+
#ifndef IGNORE_PIN_PA30
226227
if (MICROPY_HW_NEOPIXEL == &pin_PA30 && DSU->STATUSB.bit.DBGPRES == 1) {
227228
return false;
228229
}
230+
#endif
229231
return !neopixel_in_use;
230232
}
231233
#endif

0 commit comments

Comments
 (0)