Combined DCD MUSB implementations

Combined the new MAX32 MUSB implementation with the existing (TI) implementation to provide generic code base for working the MUSB DCD peripheral.
 - Added abstraction calls for FIFO setup, EP registers, Ctrl registers and interrupt setup.
 - Combined TM4C and MSP432E into a single header file.
 - Created musb_max32.h, and removed the MAX32 specific C implementation.
 - Updated MAX32 build system to use dcd_musb.c.
 - Added MAX32 conditions for cdc_dual_ports example descriptors missed during first testing.
This commit is contained in:
Brent Kowal
2024-07-25 09:08:37 -04:00
parent 13f5f20c98
commit 5122d6d109
17 changed files with 711 additions and 1200 deletions

View File

@@ -132,7 +132,7 @@ function(family_configure_example TARGET RTOS)
# Add TinyUSB target and port source
family_add_tinyusb(${TARGET} OPT_MCU_MAX32650 ${RTOS})
target_sources(${TARGET}-tinyusb PUBLIC
${TOP}/src/portable/analog/max32/dcd_max32.c
${TOP}/src/portable/mentor/musb/dcd_musb.c
)
target_compile_options(${TARGET} PRIVATE
-Wno-error=strict-prototypes

View File

@@ -62,7 +62,7 @@ flash: $(DEFAULT_FLASH)
# -----------------
PERIPH_SRC = $(TOP)/$(MAX32_PERIPH)/Source
SRC_C += \
src/portable/analog/max32/dcd_max32.c \
src/portable/mentor/musb/dcd_musb.c \
$(MAX32_CMSIS)/Device/Maxim/MAX32650/Source/heap.c \
$(MAX32_CMSIS)/Device/Maxim/MAX32650/Source/system_max32650.c \
$(MAX32_CMSIS)/Device/Maxim/MAX32650/Source/header_MAX32650.c \

View File

@@ -127,7 +127,7 @@ function(family_configure_example TARGET RTOS)
# Add TinyUSB target and port source
family_add_tinyusb(${TARGET} OPT_MCU_MAX32666 ${RTOS})
target_sources(${TARGET}-tinyusb PUBLIC
${TOP}/src/portable/analog/max32/dcd_max32.c
${TOP}/src/portable/mentor/musb/dcd_musb.c
)
target_compile_options(${TARGET} PRIVATE
-Wno-error=strict-prototypes

View File

@@ -57,7 +57,7 @@ flash-msdk: $(BUILD)/$(PROJECT).elf
# -----------------
PERIPH_SRC = $(TOP)/$(MAX32_PERIPH)/Source
SRC_C += \
src/portable/analog/max32/dcd_max32.c \
src/portable/mentor/musb/dcd_musb.c \
$(MAX32_CMSIS)/Device/Maxim/MAX32665/Source/heap.c \
$(MAX32_CMSIS)/Device/Maxim/MAX32665/Source/system_max32665.c \
$(PERIPH_SRC)/SYS/mxc_assert.c \

View File

@@ -132,7 +132,7 @@ function(family_configure_example TARGET RTOS)
# Add TinyUSB target and port source
family_add_tinyusb(${TARGET} OPT_MCU_MAX32690 ${RTOS})
target_sources(${TARGET}-tinyusb PUBLIC
${TOP}/src/portable/analog/max32/dcd_max32.c
${TOP}/src/portable/mentor/musb/dcd_musb.c
)
target_compile_options(${TARGET} PRIVATE
-Wno-error=strict-prototypes

View File

@@ -64,7 +64,7 @@ flash-msdk: $(BUILD)/$(PROJECT).elf
# -----------------
PERIPH_SRC = $(TOP)/$(MAX32_PERIPH)/Source
SRC_C += \
src/portable/analog/max32/dcd_max32.c \
src/portable/mentor/musb/dcd_musb.c \
$(MAX32_CMSIS)/Device/Maxim/MAX32690/Source/heap.c \
$(MAX32_CMSIS)/Device/Maxim/MAX32690/Source/system_max32690.c \
$(PERIPH_SRC)/SYS/mxc_assert.c \

View File

@@ -137,7 +137,7 @@ function(family_configure_example TARGET RTOS)
# Add TinyUSB target and port source
family_add_tinyusb(${TARGET} OPT_MCU_MAX78002 ${RTOS})
target_sources(${TARGET}-tinyusb PUBLIC
${TOP}/src/portable/analog/max32/dcd_max32.c
${TOP}/src/portable/mentor/musb/dcd_musb.c
)
target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
target_compile_options(${TARGET}-tinyusb PRIVATE

View File

@@ -60,7 +60,7 @@ flash-msdk: $(BUILD)/$(PROJECT).elf
# -----------------
PERIPH_SRC = $(TOP)/$(MAX32_PERIPH)/Source
SRC_C += \
src/portable/analog/max32/dcd_max32.c \
src/portable/mentor/musb/dcd_musb.c \
$(MAX32_CMSIS)/Device/Maxim/MAX78002/Source/heap.c \
$(MAX32_CMSIS)/Device/Maxim/MAX78002/Source/system_max78002.c \
$(PERIPH_SRC)/SYS/mxc_assert.c \