diff options
| author | Reinhard Panhuber <[email protected]> | 2020-06-11 14:35:44 +0200 |
|---|---|---|
| committer | Reinhard Panhuber <[email protected]> | 2020-06-11 14:35:44 +0200 |
| commit | d2f1bb58b32c17731d1d6ee094b19ad5e1d8413f (patch) | |
| tree | 51bc3b36868c93716a2a1cacfc35abbc00d35af9 /hw | |
| parent | 9be2f1bf3dc2c89bc23eed1e95c06de41ebb0946 (diff) | |
| parent | d9496256cf5979f4bf2a6eb915e098861a459394 (diff) | |
Merge branch 'master' into uac2
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/esp32s2_saola_1/esp32s2_saola_1.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/bsp/esp32s2_saola_1/esp32s2_saola_1.c b/hw/bsp/esp32s2_saola_1/esp32s2_saola_1.c index ef70f1ee2..bbcdab6d2 100644 --- a/hw/bsp/esp32s2_saola_1/esp32s2_saola_1.c +++ b/hw/bsp/esp32s2_saola_1/esp32s2_saola_1.c @@ -26,7 +26,9 @@ #include "../board.h" #include "driver/gpio.h" +#include "driver/periph_ctrl.h" #include "hal/usb_hal.h" +#include "soc/usb_periph.h" #include "driver/rmt.h" #include "led_strip/include/led_strip.h" @@ -66,10 +68,17 @@ void board_init(void) gpio_set_pull_mode(BUTTON_PIN, BUTTON_STATE_ACTIVE ? GPIO_PULLDOWN_ONLY : GPIO_PULLUP_ONLY); // USB Controller Hal init + periph_module_reset(PERIPH_USB_MODULE); + periph_module_enable(PERIPH_USB_MODULE); + usb_hal_context_t hal = { .use_external_phy = false // use built-in PHY }; usb_hal_init(&hal); + + // Pin drive strength + gpio_set_drive_capability(USBPHY_DM_NUM, GPIO_DRIVE_CAP_3); + gpio_set_drive_capability(USBPHY_DP_NUM, GPIO_DRIVE_CAP_3); } // Turn LED on or off |
