Skip to content

Commit

Permalink
cpu/esp32: add periph_usbdev driver
Browse files Browse the repository at this point in the history
Since the ESP32x SoCs integrate the same Synopsys DWC2 IP core as STM32 as USB peripherals, the driver is just a copy of `cpu/stm32/periph/usbdev_otg.c`, where the identifiers `stm32_*` and `STM32_*` have simply been replaced by `esp32_*` and `ESP32_*` respectively. Only the function `_usbdev_init` has been slightly changed.
  • Loading branch information
gschorcht committed Sep 22, 2022
1 parent 4c63474 commit a174ac6
Show file tree
Hide file tree
Showing 3 changed files with 1,262 additions and 6 deletions.
4 changes: 1 addition & 3 deletions cpu/esp32/include/sdkconfig_esp32s2.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ extern "C" {
/**
* ESP32-S2 specific PHY configuration
*/
#define CONFIG_USB_OTG_SUPPORTED 0
#define CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE 256
#define CONFIG_USB_HOST_HW_BUFFER_BIAS_BALANCED 1
#define CONFIG_USB_OTG_SUPPORTED 1

/**
* ESP32-S2 specific SPI RAM configuration
Expand Down
4 changes: 1 addition & 3 deletions cpu/esp32/include/sdkconfig_esp32s3.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ extern "C" {
* ESP32-S3 specific PHY configuration
*/
#define CONFIG_ESP_PHY_ENABLE_USB 1
#define CONFIG_USB_OTG_SUPPORTED 0
#define CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE 256
#define CONFIG_USB_HOST_HW_BUFFER_BIAS_BALANCED 1
#define CONFIG_USB_OTG_SUPPORTED 1

/**
* ESP32-S3 specific SPI RAM configuration
Expand Down
Loading

0 comments on commit a174ac6

Please sign in to comment.