mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-30 22:20:17 +00:00
add makefile, add cdc_uac2 to cmake example list, update descriptor to build with nrf and samg/7x
This commit is contained in:
parent
6844055dd1
commit
d89fc0772b
@ -13,6 +13,7 @@ family_add_subdirectory(board_test)
|
|||||||
family_add_subdirectory(cdc_dual_ports)
|
family_add_subdirectory(cdc_dual_ports)
|
||||||
family_add_subdirectory(cdc_msc)
|
family_add_subdirectory(cdc_msc)
|
||||||
family_add_subdirectory(cdc_msc_freertos)
|
family_add_subdirectory(cdc_msc_freertos)
|
||||||
|
family_add_subdirectory(cdc_uac2)
|
||||||
family_add_subdirectory(dfu)
|
family_add_subdirectory(dfu)
|
||||||
family_add_subdirectory(dfu_runtime)
|
family_add_subdirectory(dfu_runtime)
|
||||||
family_add_subdirectory(dynamic_configuration)
|
family_add_subdirectory(dynamic_configuration)
|
||||||
|
@ -19,9 +19,9 @@ add_executable(${PROJECT})
|
|||||||
|
|
||||||
# Example source
|
# Example source
|
||||||
target_sources(${PROJECT} PUBLIC
|
target_sources(${PROJECT} PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/cdc_app.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
|
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/tusb_cdc.c
|
${CMAKE_CURRENT_SOURCE_DIR}/src/uac2_app.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/tusb_uac2.c
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
|
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ target_include_directories(${PROJECT} PUBLIC
|
|||||||
|
|
||||||
# Configure compilation flags and libraries for the example... see the corresponding function
|
# Configure compilation flags and libraries for the example... see the corresponding function
|
||||||
# in hw/bsp/FAMILY/family.cmake for details.
|
# in hw/bsp/FAMILY/family.cmake for details.
|
||||||
family_configure_device_example(${PROJECT})
|
family_configure_device_example(${PROJECT} noos)
|
||||||
|
|
||||||
# Uncomment me to enable UART based debugging
|
# Uncomment me to enable UART based debugging
|
||||||
# pico_enable_stdio_uart(${PROJECT} 1)
|
# pico_enable_stdio_uart(${PROJECT} 1)
|
||||||
|
16
examples/device/cdc_uac2/Makefile
Normal file
16
examples/device/cdc_uac2/Makefile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
include ../../make.mk
|
||||||
|
|
||||||
|
INC += \
|
||||||
|
src \
|
||||||
|
$(TOP)/hw \
|
||||||
|
|
||||||
|
# Example source
|
||||||
|
EXAMPLE_SOURCE += \
|
||||||
|
src/cdc_app.c \
|
||||||
|
src/main.c \
|
||||||
|
src/uac2_app.c \
|
||||||
|
src/usb_descriptors.c \
|
||||||
|
|
||||||
|
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
|
||||||
|
|
||||||
|
include ../../rules.mk
|
@ -1,52 +0,0 @@
|
|||||||
board:curiosity_nano
|
|
||||||
board:frdm_kl25z
|
|
||||||
board:stm32l052dap52
|
|
||||||
family:broadcom_32bit
|
|
||||||
family:broadcom_64bit
|
|
||||||
family:ch32v307
|
|
||||||
family:fomu
|
|
||||||
family:gd32vf103
|
|
||||||
family:kinetis_k32l
|
|
||||||
family:kinetis_kl
|
|
||||||
family:lpc11
|
|
||||||
family:lpc13
|
|
||||||
family:lpc15
|
|
||||||
family:lpc17
|
|
||||||
family:lpc51
|
|
||||||
family:lpc54
|
|
||||||
family:lpc55
|
|
||||||
family:mm32
|
|
||||||
family:msp430
|
|
||||||
family:msp432e
|
|
||||||
family:msp432e4
|
|
||||||
family:nrf
|
|
||||||
family:ra
|
|
||||||
family:rx
|
|
||||||
family:samd11
|
|
||||||
family:samd21
|
|
||||||
family:samd51
|
|
||||||
family:same5x
|
|
||||||
family:saml2x
|
|
||||||
family:stm32f0
|
|
||||||
family:stm32f1
|
|
||||||
family:stm32f2
|
|
||||||
family:stm32f3
|
|
||||||
family:stm32f4
|
|
||||||
family:stm32f7
|
|
||||||
family:stm32g4
|
|
||||||
family:stm32h7
|
|
||||||
family:stm32l0
|
|
||||||
family:stm32l4
|
|
||||||
family:stm32u5
|
|
||||||
family:stm32wb
|
|
||||||
family:tm4c123
|
|
||||||
family:xmc4000
|
|
||||||
mcu:LPC11UXX
|
|
||||||
mcu:LPC13XX
|
|
||||||
mcu:MKL25ZXX
|
|
||||||
mcu:MSP430x5xx
|
|
||||||
mcu:NUC121
|
|
||||||
mcu:SAMD11
|
|
||||||
mcu:SAME5X
|
|
||||||
mcu:SAMG
|
|
||||||
mcu:STM32L0
|
|
@ -92,18 +92,30 @@ uint8_t const * tud_descriptor_device_cb(void)
|
|||||||
#define EPNUM_AUDIO_IN 0x08
|
#define EPNUM_AUDIO_IN 0x08
|
||||||
#define EPNUM_AUDIO_OUT 0x08
|
#define EPNUM_AUDIO_OUT 0x08
|
||||||
|
|
||||||
|
#define EPNUM_CDC_NOTIF 0x81
|
||||||
|
#define EPNUM_CDC_OUT 0x02
|
||||||
|
#define EPNUM_CDC_IN 0x82
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_SAMG || CFG_TUSB_MCU == OPT_MCU_SAMX7X
|
#elif CFG_TUSB_MCU == OPT_MCU_SAMG || CFG_TUSB_MCU == OPT_MCU_SAMX7X
|
||||||
// SAMG & SAME70 don't support a same endpoint number with different direction IN and OUT
|
// SAMG & SAME70 don't support a same endpoint number with different direction IN and OUT
|
||||||
// e.g EP1 OUT & EP1 IN cannot exist together
|
// e.g EP1 OUT & EP1 IN cannot exist together
|
||||||
#define EPNUM_AUDIO_IN 0x01
|
#define EPNUM_AUDIO_IN 0x01
|
||||||
#define EPNUM_AUDIO_OUT 0x02
|
#define EPNUM_AUDIO_OUT 0x02
|
||||||
|
|
||||||
|
#define EPNUM_CDC_NOTIF 0x83
|
||||||
|
#define EPNUM_CDC_OUT 0x04
|
||||||
|
#define EPNUM_CDC_IN 0x85
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
|
#elif CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
|
||||||
// FT9XX doesn't support a same endpoint number with different direction IN and OUT
|
// FT9XX doesn't support a same endpoint number with different direction IN and OUT
|
||||||
// e.g EP1 OUT & EP1 IN cannot exist together
|
// e.g EP1 OUT & EP1 IN cannot exist together
|
||||||
#define EPNUM_AUDIO_IN 0x01
|
#define EPNUM_AUDIO_IN 0x01
|
||||||
#define EPNUM_AUDIO_OUT 0x02
|
#define EPNUM_AUDIO_OUT 0x02
|
||||||
|
|
||||||
|
#define EPNUM_CDC_NOTIF 0x83
|
||||||
|
#define EPNUM_CDC_OUT 0x04
|
||||||
|
#define EPNUM_CDC_IN 0x85
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define EPNUM_AUDIO_IN 0x01
|
#define EPNUM_AUDIO_IN 0x01
|
||||||
#define EPNUM_AUDIO_OUT 0x01
|
#define EPNUM_AUDIO_OUT 0x01
|
||||||
|
Loading…
x
Reference in New Issue
Block a user