Skip to content

Commit af8de21

Browse files
authored
Merge pull request #10367 from Neradoc/add-USB-host-teensy-40
Enable USB host on teensy 4.0 (bottom pads)
2 parents ef9e14b + 0b7ab1e commit af8de21

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

ports/mimxrt10xx/boards/teensy40/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@
2525

2626
#define DEFAULT_UART_BUS_RX (&pin_GPIO_AD_B0_03)
2727
#define DEFAULT_UART_BUS_TX (&pin_GPIO_AD_B0_02)
28+
29+
#define CIRCUITPY_USB_DEVICE_INSTANCE 0
30+
#define CIRCUITPY_USB_HOST_INSTANCE 1

ports/mimxrt10xx/boards/teensy40/mpconfigboard.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ CHIP_VARIANT = MIMXRT1062DVJ6A
77
CHIP_FAMILY = MIMXRT1062
88
FLASH = W25Q16JV
99
CIRCUITPY__EVE = 1
10+
CIRCUITPY_USB_HOST = 1
1011
CIRCUITPY_SETTABLE_PROCESSOR_FREQUENCY = 1

ports/mimxrt10xx/boards/teensy40/pins.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ static const mp_rom_map_elem_t board_module_globals_table[] = {
120120
{MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj)},
121121
{MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj)},
122122

123+
// USB Host (pads)
124+
{MP_ROM_QSTR(MP_QSTR_USB_HOST_DP), MP_ROM_PTR(&pin_USB_OTG2_DP)},
125+
{MP_ROM_QSTR(MP_QSTR_USB_HOST_DM), MP_ROM_PTR(&pin_USB_OTG2_DN)},
126+
123127
// other i2c ports defined
124128
{MP_OBJ_NEW_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_GPIO_AD_B1_06)},
125129
{MP_OBJ_NEW_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO_AD_B1_07)},

0 commit comments

Comments
 (0)