Skip to content

Commit 20156b5

Browse files
authored
Merge pull request #9048 from dhalbert/teensy-no-usb-host-power-reset
Don't reset USB_HOST_POWER on teensy 4.1 and teensy micromod
2 parents 39b16fe + ead4ee4 commit 20156b5

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

ports/mimxrt10xx/boards/sparkfun_teensy_micromod/board.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,13 @@ const mcu_pin_obj_t *mimxrt10xx_reset_forbidden_pins[] = {
5353
NULL, // Must end in NULL.
5454
};
5555

56+
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
57+
#if CIRCUITPY_USB_HOST
58+
if (pin == &pin_GPIO_EMC_40) {
59+
// Don't reset the USB_HOST_POWER pin, because it will need to be enabled in boot.py.
60+
return true;
61+
}
62+
#endif
63+
return false;
64+
}
5665
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/mimxrt10xx/boards/teensy41/board.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,14 @@ void board_init(void) {
6060
common_hal_usb_host_port_construct(&pin_USB_OTG2_DP, &pin_USB_OTG2_DN);
6161
}
6262

63+
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
64+
#if CIRCUITPY_USB_HOST
65+
if (pin == &pin_GPIO_EMC_40) {
66+
// Don't reset the USB_HOST_POWER pin, because it will need to be enabled in boot.py.
67+
return true;
68+
}
69+
#endif
70+
return false;
71+
}
72+
6373
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

0 commit comments

Comments
 (0)