8000 stm32/usbd_conf: Allow boards to configure USB HS ULPI NXT/DIR pins. · jeremyherbert/micropython@d6a1e45 · GitHub
[go: up one dir, main page]

Skip to content

Commit d6a1e45

Browse files
committed
stm32/usbd_conf: Allow boards to configure USB HS ULPI NXT/DIR pins.
1 parent 69b415f commit d6a1e45

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ports/stm32/boards/STM32F769DISC/mpconfigboard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ extern struct _spi_bdev_t spi_bdev;
102102

103103
// USB config (CN15 - USB OTG HS with external PHY)
104104
#define MICROPY_HW_USB_HS (1)
105+
#define MICROPY_HW_USB_HS_ULPI_NXT (pin_H4)
106+
#define MICROPY_HW_USB_HS_ULPI_DIR (pin_I11)
105107

106108
// Ethernet via RMII
107109
#define MICROPY_HW_ETH_MDC (pin_C1)

ports/stm32/usbd_conf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) {
171171

172172
// Configure USB HS GPIOs
173173
static const mp_hal_pin_obj_t usb_pins[] = {
174-
pin_A5, pin_C0, pin_H4, pin_I11, // CLK, STP, NXT, DIR
174+
pin_A5, pin_C0, MICROPY_HW_USB_HS_ULPI_NXT, MICROPY_HW_USB_HS_ULPI_DIR, // CLK, STP, NXT, DIR
175175
pin_A3, pin_B0, pin_B1, pin_B5, pin_B10, pin_B11, pin_B12, pin_B13, // D0-D7
176176
};
177177
for (size_t i = 0; i < MP_ARRAY_SIZE(usb_pins); ++i) {

0 commit comments

Comments
 (0)
0