Skip to content

Commit 029330d

Browse files
committed
Update esp32-hal-tinyusb.c
1 parent 7f8a0ba commit 029330d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cores/esp32/esp32-hal-tinyusb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ typedef struct {
6262
bool external_phy;
6363
} tinyusb_config_t;
6464

65+
#if __has_include("hal/usb_hal.h")
66+
67+
#include "hal/usb_hal.h"
68+
6569
static bool usb_otg_deinit(void *busptr) {
6670
// Once USB OTG is initialized, its GPIOs are assigned and it shall never be deinited
6771
// except when S3 swithicng usb from cdc to jtag while resetting to bootrom
@@ -72,10 +76,6 @@ static bool usb_otg_deinit(void *busptr) {
7276
#endif
7377
}
7478

75-
#if __has_include("hal/usb_hal.h")
76-
77-
#include "hal/usb_hal.h"
78-
7979
static void configure_pins(usb_hal_context_t *usb) {
8080
for (const usb_iopin_dsc_t *iopin = usb_periph_iopins; iopin->pin != -1; ++iopin) {
8181
if ((usb->use_external_phy) || (iopin->ext_phy_only == 0)) {

0 commit comments

Comments
 (0)