summaryrefslogtreecommitdiff
path: root/test/unit-test
AgeCommit message (Collapse)Author
2026-06-16device: clamp EP0 OUT data copy to the control transfer buffer (#3705)Ha Thach
* device: clamp EP0 OUT data copy to the control transfer buffer usbd_control_xfer_cb() copied xferred_bytes from the EP0 bounce buffer into the requester's buffer with no bound. A non-compliant host that sends an OUT data packet larger than the control transfer's data_len (= min(len, wLength), the buffer capacity) would overflow that buffer and over-count total_xferred. Clamp xferred_bytes to the remaining buffer space before the memcpy and accounting.
2026-05-12midi2: align descriptors with USB-MIDI 2.0 specSaulo Veríssimo
Brings the MIDI 2.0 device driver into full conformance with USB Device Class Definition for MIDI Devices v2.0 (USB-IF, May 2020). - Alt 1 MS Interface Header wTotalLength now reports 0x0007 per Table 5-2 ("set to match bLength"), replacing the prior 0x0011 carried over from USB-MIDI 1.0 conventions. - GET_DESCRIPTOR class request now validates bmRequestType direction, type and recipient plus wIndex and wValue high byte per Section 6. - iBlockItem in the default Group Terminal Block is driven by CFG_TUD_MIDI2_BLOCK_STRIDX so applications can attach a UI string descriptor to the block per Table 5-6. - UMP word byte order assumption (little-endian host per Section 3.2.2) is documented inline so future big-endian ports know where to wrap access with tu_htole32 / tu_le32toh. Validated on RP2040 and ESP32-P4 under Linux kernel 6.17: lsusb -v reports wTotalLength = 0x0007 on Alt 1 MS Header (raw bytes 07 24 01 00 02 07 00). amidi -l enumerates Group Terminals exposed via the class-specific GET_DESCRIPTOR response.
2026-05-12test: add MIDI 2.0 Device and Host unit testsSaulo Veríssimo
Add unit tests for MIDI 2.0 drivers: - Device: UMP word count (all 16 message types), descriptor macro validation (length, byte layout, alt settings, endpoints), CS endpoint subtypes, traversal integrity - Host: UMP word count, callback struct validation, CS endpoint subtypes Also add Sphinx documentation for MIDI 2.0 class drivers (Device and Host API reference, lifecycle, configuration, examples). Tests: 60/60 PASS (FIFO 26/26, USBD 5/5, MIDI2 Device 18/18, MIDI2 Host 6/6, USBD internal 5/5)
2026-04-29deprecated `usbd_control.c` and merge its functionality into `usbd.c`hathach
2026-01-03add tu_hwfifo_access_t param to hwfifo APIhathach
2026-01-02support multiple data stride if configuredhathach
2026-01-01minor refactorhathach
2025-12-31update tu_fifo to work with fsdev hwfifo with increased address 16/32bithathach
2025-12-31re-branding fixed address fifo read/write to stride modehathach
2025-12-30tusb_fifo remove item_size make it fifo of byteshathach
2025-12-16make fifo access mode fixed addr work with 16 bit alsohathach
2025-11-27more renamehathach
2025-11-26add tu_scatter_read32(), tu_scatter_write32() to simplify tu_fifohathach
2025-11-26change tu_fifo_buffer_info_t layouthathach
2025-11-22hil stress test cdchathach
2025-11-21add more unit tests for tu_fifohathach
2025-10-31Merge remote-tracking branch 'tinyusb/master' into ↵HiFiPhile
copilot/fix-dcd-edpt-xfer-issue Signed-off-by: HiFiPhile <[email protected]>
2025-10-28fix Identifiers that start with '__' or '_[A-Z]' are reserved.hathach
fix compiling with nuc family
2025-10-22Add is_isr parameter to dcd_edpt_xfer and dcd_edpt_xfer_fifocopilot-swe-agent[bot]
Co-authored-by: HiFiPhile <[email protected]>
2025-08-01add bufsize to tud_msc_inquiry2_cb()hathach
2025-07-11add tud_msc_inquiry2_cb() for full inquiry responsehathach
2025-01-15Fix ceedling (#2949)Ha Thach
* fixed unit test with ceedling 1.0.0
2024-11-04add tusb_time_millis_api() and default/weak tusb_time_delay_ms_api(). Which ↵hathach
is required for host and some device without RTOS.
2024-10-14change dcd_init() return from void to boolhathach
2024-10-14change the tusb_rhport_init_t struct, exclude the rhport to make API more ↵hathach
consistent
2024-10-11change dcd_init() to take rhport structhathach
2024-10-11change tusb_init(), tusb_rhport_init() to use init struct for expandabilityhathach
2024-10-10add new tusb_int_handler(rhport, in_isr) as common irq handlerhathach
update tusb_init() to take rhport and role, defined as macro with optional argument for backward compatible
2024-09-17make all python files executable and standardize interpreterShawn Hoffman
2024-09-03make function prototypes match definitions ( found with cppcheck)dp111
2024-04-19- clang h743 build and run cdc_msc okhathach
- switch unit test back to gcc, since path to clang conflict on local setup (x86 and arm)
2024-03-01reformat code hid_host.chathach
- fix ceedling with ruby 3.1 - allow overwrite CMAKE_C_COMPILER/CMAKE_CXX_COMPILER from command line
2023-03-22use tud_inited() instead of tusb_inited()hathach
2023-03-17fix spellinghathach
2023-03-17fix trailing space and new linehathach
temporarily disable codespell
2023-01-21add test_common_func.chathach
2023-01-07use TU_FIFO_INIT to replace TU_FIFO_DEFhathach
2023-01-07using clang with ceedling unit-test with -fsanitize=addresshathach
2023-01-06Merge branch 'master' into fix-fifo-memory-overflowhathach
2022-12-16fix ci with usbh and unit testhathach
2022-12-09add test_write_double_overflowed for fifohathach
2022-12-08add test fifo overwritable + overflow, that cause buffer overflowhathach
2022-12-08move ceedling tests to test/unit-testhathach