1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

cpu/esp32: add ESP-IDF USB code as module esp_idf_usb

This commit is contained in:
Gunar Schorcht 2022-09-14 09:22:59 +02:00
parent 7db66e49b3
commit 23b5a785b8
5 changed files with 40 additions and 0 deletions

View File

@ -98,6 +98,10 @@ ifneq (,$(filter esp_idf_spi_flash,$(USEMODULE)))
INCLUDES += -I$(ESP32_SDK_DIR)/components/spi_flash/include
endif
ifneq (,$(filter esp_idf_usb,$(USEMODULE)))
INCLUDES += -I$(ESP32_SDK_DIR)/components/usb/include
endif
ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/include
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_eth/include

View File

@ -28,5 +28,6 @@ rsource "heap/Kconfig"
rsource "nvs_flash/Kconfig"
rsource "spi_flash/Kconfig"
rsource "spi_ram/Kconfig"
rsource "usb/Kconfig"
rsource "wifi/Kconfig"
rsource "wpa_supplicant/Kconfig"

View File

@ -48,6 +48,10 @@ ifneq (,$(filter esp_idf_spi_ram,$(USEMODULE)))
DIRS += spi_ram
endif
ifneq (,$(filter esp_idf_usb,$(USEMODULE)))
DIRS += usb
endif
ifneq (,$(filter esp_idf_wifi,$(USEMODULE)))
DIRS += wifi
endif

View File

@ -0,0 +1,14 @@
# Copyright (c) 2022 Gunar Schorcht
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_ESP_IDF_USB
bool
depends on TEST_KCONFIG
depends on MODULE_ESP_IDF
default y if MODULE_PERIPH_USBDEV
help
ESP-IDF code for USB.

View File

@ -0,0 +1,17 @@
MODULE = esp_idf_usb
# source files to be compiled for this module
ESP32_SDK_SRC = \
components/hal/usb_hal.c \
components/hal/usb_phy_hal.c \
components/soc/$(CPU_FAM)/usb_periph.c \
components/soc/$(CPU_FAM)/usb_phy_periph.c \
components/usb/usb_phy.c \
#
include $(RIOTBASE)/Makefile.base
ESP32_SDK_BIN = $(BINDIR)/$(MODULE)
include ../esp_idf.mk
include ../esp_idf_cflags.mk