diff options
Diffstat (limited to 'examples')
26 files changed, 92 insertions, 12 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 7669290a8..6122b7d54 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -21,7 +21,7 @@ endforeach () find_package(Python3 REQUIRED COMPONENTS Interpreter) add_custom_target(tinyusb_metrics COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../tools/metrics.py - combine -f tinyusb/src -j -o ${CMAKE_BINARY_DIR}/metrics + combine -f tinyusb/src -j --by-example -o ${CMAKE_BINARY_DIR}/metrics ${MAPJSON_PATTERNS} COMMENT "Generating average code size metrics" VERBATIM diff --git a/examples/device/audio_4_channel_mic/src/usb_descriptors.c b/examples/device/audio_4_channel_mic/src/usb_descriptors.c index 42da9442c..020bc934e 100644 --- a/examples/device/audio_4_channel_mic/src/usb_descriptors.c +++ b/examples/device/audio_4_channel_mic/src/usb_descriptors.c @@ -92,6 +92,10 @@ enum // Only EP3 is available for ISO #define EPNUM_AUDIO 0x03 +#elif CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101 + // ERR050101 (see CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101): an isochronous IN endpoint needs a number + // no other device on the bus uses + #define EPNUM_AUDIO 0x07 #else #define EPNUM_AUDIO 0x01 #endif diff --git a/examples/device/audio_test/src/usb_descriptors.c b/examples/device/audio_test/src/usb_descriptors.c index 8c25fc290..d16526116 100644 --- a/examples/device/audio_test/src/usb_descriptors.c +++ b/examples/device/audio_test/src/usb_descriptors.c @@ -92,6 +92,10 @@ enum // Only EP3 is available for ISO #define EPNUM_AUDIO 0x03 +#elif CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101 + // ERR050101 (see CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101): an isochronous IN endpoint needs a number + // no other device on the bus uses + #define EPNUM_AUDIO 0x07 #else #define EPNUM_AUDIO 0x01 #endif diff --git a/examples/device/cdc_uac2/src/usb_descriptors.c b/examples/device/cdc_uac2/src/usb_descriptors.c index 9c1bbee47..648c56e71 100644 --- a/examples/device/cdc_uac2/src/usb_descriptors.c +++ b/examples/device/cdc_uac2/src/usb_descriptors.c @@ -110,6 +110,16 @@ uint8_t const * tud_descriptor_device_cb(void) #define EPNUM_CDC_IN 0x85 #endif +#elif CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101 + // ERR050101 (see CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101): an isochronous IN endpoint needs a number + // no other device on the bus uses + #define EPNUM_AUDIO_IN 0x07 + #define EPNUM_AUDIO_OUT 0x01 + + #define EPNUM_CDC_NOTIF 0x83 + #define EPNUM_CDC_OUT 0x04 + #define EPNUM_CDC_IN 0x84 + #else #define EPNUM_AUDIO_IN 0x01 #define EPNUM_AUDIO_OUT 0x01 diff --git a/examples/device/uac2_headset/src/usb_descriptors.c b/examples/device/uac2_headset/src/usb_descriptors.c index 27b6c930c..d8cdd768e 100644 --- a/examples/device/uac2_headset/src/usb_descriptors.c +++ b/examples/device/uac2_headset/src/usb_descriptors.c @@ -109,6 +109,13 @@ uint8_t const * tud_descriptor_device_cb(void) #define EPNUM_AUDIO_INT 0x03 #endif +#elif CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101 + // ERR050101 (see CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101): an isochronous IN endpoint needs a number + // no other device on the bus uses + #define EPNUM_AUDIO_IN 0x07 + #define EPNUM_AUDIO_OUT 0x01 + #define EPNUM_AUDIO_INT 0x02 + #else #define EPNUM_AUDIO_IN 0x01 #define EPNUM_AUDIO_OUT 0x01 diff --git a/examples/device/usbtest/src/usb_descriptors.c b/examples/device/usbtest/src/usb_descriptors.c index b4f46adb8..8453885c4 100644 --- a/examples/device/usbtest/src/usb_descriptors.c +++ b/examples/device/usbtest/src/usb_descriptors.c @@ -132,6 +132,22 @@ enum { #define EPNUM_ISO_OUT 0x08 #define EPNUM_ISO_IN 0x88 +#elif CFG_TUSB_MCU == OPT_MCU_MIMXRT1XXX + #define EPNUM_BULK_OUT 0x01 + #define EPNUM_BULK_IN 0x81 + #define EPNUM_INT_OUT 0x02 + #define EPNUM_INT_IN 0x82 + #define EPNUM_ISO_OUT 0x03 + // ERR050101 (see CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101): park the iso IN endpoint clear of the numbers + // other devices use. Override per board when several affected boards share a hub. + #ifndef EPNUM_ISO_IN + #if CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101 + #define EPNUM_ISO_IN 0x87 + #else + #define EPNUM_ISO_IN 0x83 + #endif + #endif + #else #define EPNUM_BULK_OUT 0x01 #define EPNUM_BULK_IN 0x81 diff --git a/examples/device/video_capture/src/usb_descriptors.c b/examples/device/video_capture/src/usb_descriptors.c index d5d805f0b..11321a305 100644 --- a/examples/device/video_capture/src/usb_descriptors.c +++ b/examples/device/video_capture/src/usb_descriptors.c @@ -113,6 +113,10 @@ enum { #define EPNUM_VIDEO_IN (CFG_TUD_VIDEO_STREAMING_BULK ? 0x81 : 0x88) #elif TU_CHECK_MCU(OPT_MCU_MAX32650, OPT_MCU_MAX32666, OPT_MCU_MAX32690, OPT_MCU_MAX78002) #define EPNUM_VIDEO_IN 0x81 +#elif CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101 + // ERR050101 (see CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101): an isochronous IN endpoint needs a number + // no other device on the bus uses + #define EPNUM_VIDEO_IN (CFG_TUD_VIDEO_STREAMING_BULK ? 0x81 : 0x87) #else #define EPNUM_VIDEO_IN 0x81 #endif diff --git a/examples/device/video_capture_2ch/src/usb_descriptors.c b/examples/device/video_capture_2ch/src/usb_descriptors.c index ad65cc019..2630be84b 100644 --- a/examples/device/video_capture_2ch/src/usb_descriptors.c +++ b/examples/device/video_capture_2ch/src/usb_descriptors.c @@ -110,8 +110,15 @@ enum { ITF_NUM_TOTAL }; -#define EPNUM_VIDEO_IN_1 0x81 -#define EPNUM_VIDEO_IN_2 0x82 +#if CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101 && !CFG_TUD_VIDEO_STREAMING_BULK + // ERR050101 (see CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101): an isochronous IN endpoint needs a number + // no other device on the bus uses + #define EPNUM_VIDEO_IN_1 0x86 + #define EPNUM_VIDEO_IN_2 0x87 +#else + #define EPNUM_VIDEO_IN_1 0x81 + #define EPNUM_VIDEO_IN_2 0x82 +#endif #if defined(CFG_EXAMPLE_VIDEO_READONLY) && !defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG) #define USE_MJPEG 1 diff --git a/examples/host/bare_api/only.txt b/examples/host/bare_api/only.txt index a2ff93be5..3287df65a 100644 --- a/examples/host/bare_api/only.txt +++ b/examples/host/bare_api/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/bare_api/skip.txt b/examples/host/bare_api/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/bare_api/skip.txt +++ b/examples/host/bare_api/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/cdc_msc_hid/only.txt b/examples/host/cdc_msc_hid/only.txt index a2f4f273a..c4a23328e 100644 --- a/examples/host/cdc_msc_hid/only.txt +++ b/examples/host/cdc_msc_hid/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/cdc_msc_hid/skip.txt b/examples/host/cdc_msc_hid/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/cdc_msc_hid/skip.txt +++ b/examples/host/cdc_msc_hid/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/cdc_msc_hid_freertos/only.txt b/examples/host/cdc_msc_hid_freertos/only.txt index 4ab8a906e..09b0125b0 100644 --- a/examples/host/cdc_msc_hid_freertos/only.txt +++ b/examples/host/cdc_msc_hid_freertos/only.txt @@ -1,5 +1,5 @@ family:espressif -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:LPC175X_6X mcu:LPC177X_8X diff --git a/examples/host/cdc_msc_hid_freertos/skip.txt b/examples/host/cdc_msc_hid_freertos/skip.txt index f0be07d25..f5fe146c8 100644 --- a/examples/host/cdc_msc_hid_freertos/skip.txt +++ b/examples/host/cdc_msc_hid_freertos/skip.txt @@ -1,3 +1,6 @@ mcu:CH32F20X board:lpcxpresso54114 mcu:FT90X +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/device_info/only.txt b/examples/host/device_info/only.txt index 7f30218df..2c9c8834a 100644 --- a/examples/host/device_info/only.txt +++ b/examples/host/device_info/only.txt @@ -1,6 +1,6 @@ family:espressif family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/device_info/skip.txt b/examples/host/device_info/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/device_info/skip.txt +++ b/examples/host/device_info/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/hid_controller/only.txt b/examples/host/hid_controller/only.txt index 45ca6846f..7b4f14863 100644 --- a/examples/host/hid_controller/only.txt +++ b/examples/host/hid_controller/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/hid_controller/skip.txt b/examples/host/hid_controller/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/hid_controller/skip.txt +++ b/examples/host/hid_controller/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/midi2_host/only.txt b/examples/host/midi2_host/only.txt index c71aacd87..8ffe1cd04 100644 --- a/examples/host/midi2_host/only.txt +++ b/examples/host/midi2_host/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:ESP32P4 diff --git a/examples/host/midi2_host/skip.txt b/examples/host/midi2_host/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/midi2_host/skip.txt +++ b/examples/host/midi2_host/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/midi_rx/only.txt b/examples/host/midi_rx/only.txt index 65ef8fac9..b467c6e3b 100644 --- a/examples/host/midi_rx/only.txt +++ b/examples/host/midi_rx/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:ESP32P4 diff --git a/examples/host/midi_rx/skip.txt b/examples/host/midi_rx/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/midi_rx/skip.txt +++ b/examples/host/midi_rx/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/msc_file_explorer/only.txt b/examples/host/msc_file_explorer/only.txt index a2ff93be5..3287df65a 100644 --- a/examples/host/msc_file_explorer/only.txt +++ b/examples/host/msc_file_explorer/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/msc_file_explorer/skip.txt b/examples/host/msc_file_explorer/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/msc_file_explorer/skip.txt +++ b/examples/host/msc_file_explorer/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/msc_file_explorer_freertos/only.txt b/examples/host/msc_file_explorer_freertos/only.txt index 519ac2ebd..4f4f8fe6b 100644 --- a/examples/host/msc_file_explorer_freertos/only.txt +++ b/examples/host/msc_file_explorer_freertos/only.txt @@ -1,5 +1,5 @@ family:espressif -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:LPC175X_6X mcu:LPC177X_8X diff --git a/examples/host/msc_file_explorer_freertos/skip.txt b/examples/host/msc_file_explorer_freertos/skip.txt index a8c9bea2a..06afcf825 100644 --- a/examples/host/msc_file_explorer_freertos/skip.txt +++ b/examples/host/msc_file_explorer_freertos/skip.txt @@ -2,3 +2,7 @@ mcu:CH32F20X board:lpcxpresso54114 mcu:FT90X board:stm32h7s3nucleo +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 +board:curiosity_nano |
