summaryrefslogtreecommitdiff
path: root/src/device/dcd.h
AgeCommit message (Collapse)Author
5 daysusbd: split bus reset into start/end edge eventshathach
A driver that can see reset signalling begin has no way to say so: the only event carries the negotiated speed, which does not exist until the reset ends. On ChipIdea that left the stack believing it was still configured for the whole reset window - 3 ms at minimum, tens of milliseconds in practice - while the controller had already torn its endpoints down, so a class driver writing in that window primed a disabled endpoint over a zeroed queue head. Add DCD_EVENT_BUS_RESET_START for the leading edge and rename the existing event to DCD_EVENT_BUS_RESET_END, keeping DCD_EVENT_BUS_RESET as an alias. START is optional and END stays self-sufficient, so every other driver and the unit tests are untouched.
2026-07-02license: use SPDX identifiers for src/ headers (#3749)Ha Thach
* license: use SPDX identifiers for src/ headers Replace the full ~20-line MIT license boilerplate on every src/ file with a two-line SPDX tag (SPDX-FileCopyrightText + SPDX-License-Identifier), following the REUSE convention used by CircuitPython and the Linux kernel. Removes ~3500 lines of duplicated boilerplate.
2026-04-13fix(device): big-endian host support for SETUP packet handlingFan DANG
1. Add TU_LITTLE_ENDIAN_BITFIELD / TU_BIG_ENDIAN_BITFIELD macros in tusb_compiler.h (GCC and IAR), following Linux kernel style. 2. Update bmAttributes (tusb_desc_endpoint_t) and bmRequestType_bit (tusb_control_request_t) in tusb_types.h to use these macros with explicit #error fallback if undefined. 3. Add tu_le16toh() conversion in dcd_event_setup_received() for wValue/wIndex/wLength. Tested on CIU98320B (big-endian ARM Cortex-M, full-speed HID keyboard).
2025-11-21dcd: add tud_configure()HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-11-19Merge remote-tracking branch 'tinyusb/master' into ↵HiFiPhile
copilot/fix-dcd-edpt-xfer-issue Signed-off-by: HiFiPhile <[email protected]>
2025-11-17make TUP_DCD_EDPT_ISO_ALLOC i.e dcd_edpt_iso_alloc()/dcd_edpt_iso_activate() ↵hathach
as default driver implementation. dcd_edpt_close() is deprecated and will be removed from all driver in the future.
2025-11-11Merge remote-tracking branch 'tinyusb/master' into ↵HiFiPhile
copilot/fix-dcd-edpt-xfer-issue Signed-off-by: HiFiPhile <[email protected]>
2025-11-04Fixed more alert found by PVS-Studiohathach
2025-10-31Merge remote-tracking branch 'tinyusb/master' into ↵HiFiPhile
copilot/fix-dcd-edpt-xfer-issue Signed-off-by: HiFiPhile <[email protected]>
2025-10-24fix more warningshathach
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-09-17Update weak callbacks to new syntaxHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2024-11-25change dcd_dcache_*() API return type from void to boolhathach
2024-11-20have p4 dma somewhat working but having issue with buffer that does not ↵hathach
occupy the whole cache line
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-11fix fuzzing buildhathach
2024-10-11change dcd_init() to take rhport structhathach
2024-08-19remove weak from dcd_edpt_close() for port without TUP_DCD_EDPT_ISO_ALLOChathach
2024-08-19fix ci buildhathach
2024-08-19implement dcd_edpt_iso_alloc/dcd_edpt_iso_activate for musb. video_capture ↵hathach
example with iso kind of work but not smoothly. audio example does not seems to work as expected
2024-07-30add edpt0_open(), slightly update dtoghathach
2024-07-25fix race condition where reset event cleaar setup counthathach
2024-07-12simplify dwc2 test modehathach
- all dwc2 ip seems to support test mode in both fs/hs -> remove TUP_USBIP_DWC2_TEST_MODE - remove dcd_check_test_mode_support(), all should be supported - move enum tusb_feature_test_mode_t to tusb_types.h
2024-05-24minor clean uphathach
2024-05-24add ch32 support for fsdev driver. v20x can select fsdev or usbfs with ↵hathach
make/cmake PORT=0/1. default to fsdev
2024-05-13Adjust logic.HiFiPhile
2024-05-13Merge branch 'master' into test-mode-supportHiFiPhile
2024-04-08add class driver deinithathach
2024-04-08Implements tuh_deinit() and tud_deinit() to uninitialize host/device mode.Felix "xq" Queißner
2024-01-15Merge branch 'master' into test-mode-supportRocky04
2024-01-15Removed whitespaceRocky04
2024-01-15Change to control complete cbRocky04
2024-01-15Add DWC2 Test Mode SUpportRocky04
2024-01-12Merge pull request #2239 from XelaRellum/bugfix_stm32_fsdev_keilHa Thach
Fixes #1018 the weak dcd_edpt0_status_complete for Keil Compiler
2023-11-24minor dochathach
2023-08-29Fix the weak dcd_edpt0_status_complete for Keil CompilerAlexander Mueller
The Keil compiler seems to have different semantics and the defined function was never called. The same is probably true for the other weak functions. I can change those too.
2023-06-16fix build warningshathach
2023-06-09move protocol message to stack, disable battery in PWR's CR3hathach
there is still issue with CC1/CC2 pull down resistor and vstate is not correct.
2023-05-23Enhance chipidea (#2075)Ha Thach
* update chipidea dcd, remove manual ep_count and use DCCPARAMS to get number of endpoint instead * add dcd dcache for chipidea * add cmake for lpc18 * add makefile build for mcx * use fork of mcu sdk * fix ci build with nrf * flash rp2040 with openocd
2023-03-17fix trailing space and new linehathach
temporarily disable codespell
2023-02-28Merge pull request #1828 from HiFiPhile/stm32_fsdevHa Thach
stm32_fsdev & ISO EP buffer allocation improvements
2023-01-13fix: Replace device calls to memcpy with tu_memcpy_sNathaniel Brough
Introduces a new function tu_memcpy_s, which is effectively a backport of memcpy_s. The change also refactors calls to memcpy over to the more secure tu_memcpy_s.
2022-12-29UAC : Enable fifo based transfer on stm32_fsdevMengsk
2022-12-29Add dcd_edpt_iso_alloc() / dcd_edpt_iso_activate() for ISO EP buffer management.Mengsk
2022-06-24fix redundant-decls warnings by usbd/usbhhathach
2022-05-31Merge pull request #1381 from hathach/add-sof-isrHa Thach
Add SOF IRQ Handler
2022-04-18clean up pio driverhathach
2022-03-07added dcd_sof_enable(), tud_sof_isr_set()hathach
make number of interface configurable (default to 8) CFG_TUD_INTERFACE_MAX
2022-02-26more internal renamehathach