stm32/usbd_conf: Allow boards to configure USB HS ULPI NXT/DIR pins.
This commit is contained in:
parent
69b415f745
commit
d6a1e45caa
|
@ -102,6 +102,8 @@ extern struct _spi_bdev_t spi_bdev;
|
|||
|
||||
// USB config (CN15 - USB OTG HS with external PHY)
|
||||
#define MICROPY_HW_USB_HS (1)
|
||||
#define MICROPY_HW_USB_HS_ULPI_NXT (pin_H4)
|
||||
#define MICROPY_HW_USB_HS_ULPI_DIR (pin_I11)
|
||||
|
||||
// Ethernet via RMII
|
||||
#define MICROPY_HW_ETH_MDC (pin_C1)
|
||||
|
|
|
@ -171,7 +171,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) {
|
|||
|
||||
// Configure USB HS GPIOs
|
||||
static const mp_hal_pin_obj_t usb_pins[] = {
|
||||
pin_A5, pin_C0, pin_H4, pin_I11, // CLK, STP, NXT, DIR
|
||||
pin_A5, pin_C0, MICROPY_HW_USB_HS_ULPI_NXT, MICROPY_HW_USB_HS_ULPI_DIR, // CLK, STP, NXT, DIR
|
||||
pin_A3, pin_B0, pin_B1, pin_B5, pin_B10, pin_B11, pin_B12, pin_B13, // D0-D7
|
||||
};
|
||||
for (size_t i = 0; i < MP_ARRAY_SIZE(usb_pins); ++i) {
|
||||
|
|
Loading…
Reference in New Issue