summaryrefslogtreecommitdiff
path: root/ports/raspberrypi
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2021-01-25 16:07:01 -0500
committerDan Halbert <halbert@halwitz.org>2021-01-25 16:07:01 -0500
commit0fa5aa359df3827a90be6c4e82719bb2ed8713e7 (patch)
treebaf2c65dfaf46fd34b1eecd2b838409763f879a3 /ports/raspberrypi
parent1e97d384ff469731832147f7dc07aa1f358cd572 (diff)
Stop treating pin 15 specially.
Diffstat (limited to 'ports/raspberrypi')
-rw-r--r--ports/raspberrypi/common-hal/microcontroller/Pin.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/ports/raspberrypi/common-hal/microcontroller/Pin.c b/ports/raspberrypi/common-hal/microcontroller/Pin.c
index 90c327406..6e531560e 100644
--- a/ports/raspberrypi/common-hal/microcontroller/Pin.c
+++ b/ports/raspberrypi/common-hal/microcontroller/Pin.c
@@ -63,12 +63,7 @@ void never_reset_pin_number(uint8_t pin_number) {
}
void reset_pin_number(uint8_t pin_number) {
- if (pin_number >= 32
-#if TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX
- // Pin 15 is used for Errata so we don't mess with it.
- || pin_number == 15
-#endif
- ) {
+ if (pin_number >= 32) {
return;
}
@@ -142,12 +137,7 @@ bool pin_number_is_free(uint8_t pin_number) {
if (pin_number >= 30) {
return false;
}
-#if TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX
- // Pin 15 is used for Errata so we don't mess with it.
- if (pin_number == 15) {
- return true;
- }
-#endif
+
uint32_t pad_state = padsbank0_hw->io[pin_number];
return (pad_state & PADS_BANK0_GPIO0_IE_BITS) == 0 &&
(pad_state & PADS_BANK0_GPIO0_OD_BITS) != 0;