summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-09-11fix(port/wch): fix some wch controller port bugLinks0617
2026-09-11update(port): clean and invalid buffer in usbh_submit_urb onlysakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-11fix(class/hub): only release hport in disconnectsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-11fix(port/ehci): fix qh desc and urb transfer_buffer invalidsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-11fix(core/usbh_core): fix sizeof to intsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-10Rename WCH chip port group names, add usbfs controller port support and ↵Links0617
optimize usbhs controller port
2026-09-09fix(port/musb): Fix MUSB host TX/RX FIFO flush failXiaoming Xi
musb_fifo_flush() selected the CSR side for device role, which is opposite to the host direction. Now IN endpoints (host RX) flush RXCSR, OUT endpoints (host TX) flush TXCSR, and EP0 writes the FLUSHFIFO bit in the csr0 high byte, so a timed-out/killed bulk OUT no longer leaves TXPKTRDY and the FIFO uncleaned.
2026-09-08update(port/ch32): optimize ch32 usbhs controller port and add bulk transfer ↵Links0617
burst freature support
2026-09-08update(class/audio): support usbd_audio_get_volume_range, update volume with ↵sakumisu
float and update demo Signed-off-by: sakumisu <[email protected]>
2026-09-06update(port/ch32): format codesakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-06update(port/ch32): move old code into legacysakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-06Add WCH USBHS controller supportLHD0617
2026-09-02[fix] usb_osal_freertos: fix usb_osal_sem_take() and usb_osal_timer_stop() ↵Zhihong Chen
in isr Signed-off-by: Zhihong Chen <[email protected]>
2026-09-01fix(port): fix ch58x mps typeRiven
2026-08-31update(class/wireless/usbh_rndis): process all msg into usbh_rndis_parse_respsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-31update(class): update host net class rx length checksakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-31fix(security): check usbh_control_transfer return value when bmRequestType ↵sakumisu
is USB_REQUEST_DIR_IN Signed-off-by: sakumisu <[email protected]>
2026-08-29port/fsdev: log error when USBFS clock divider has no matchOnlyoutzZ
Report an error through USB_LOG_ERR when SystemCoreClock does not match any supported 48/96/144/192/240 MHz divider case, instead of silently leaving the USBFS prescaler unconfigured.
2026-08-29fix(port/fsdev): address N32H4x glue review findingsOnlyoutzZ
- usb_glue_nation.c: match usb_dc_low_level_init/deinit to the (void) weak stubs in usb_dc_fsdev.c and guard on g_usbdev_bus[0] (the old (uint8_t busid) signature read garbage at the no-arg call site) - usb_glue_nation.c: drop NVIC_PriorityGroupConfig from the driver hook; it reprograms SCB->AIRCR for the whole system, priority grouping now stays with board/application startup code - usb_glue_nation.c: derive the USBFS prescaler from SystemCoreClock at runtime instead of a per-part compile-time table (fixes N32H475 landing in the 240 MHz branch; adapts to any configured PLLCLK) - add docstrings to the functions touched by this diff
2026-08-29port/fsdev: add N32H4x (N32H47x_48x / N32H49x) USB FS device supportOnlyoutzZ
Add full-speed USB device (USBFS) support for the Nations N32H4x family (N32H47x_48x and N32H49x), whose Synopsys USBFS core re-arranged the register and bit-field layout of the STM32 version: - usb_glue_nation.c: chip-level bring-up (48 MHz USB clock from PLL, DM/DP GPIO with a weak overridable hook, NVIC USB_FS_LP_IRQn dispatch) - usb_fsdev_reg.h: re-map USB_EPn/CNTR/ISTR/BTABLE/FN/DADDR register layout and every affected bit macro for N32H4x (32-bit EP registers, no BCDR; DP pull-up moved to CNTR.PU) - usb_dc_fsdev.c: N32H4x power-on sequence (clear PD, wait, clear FRST) and EP_ID position handling - README: document the supported N32H4x parts
2026-08-28fix(port/ehci): fix missing cache clean for setupsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-25update(class/audio/usbh_audio): expand audio samfreq num to 8 as defaultsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-25update(third_party): sync dap_mainsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-25update(class/msc/usbd_msc): add SCSI_readCapacity16sakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-24[update] zephyr: update usbh_msc_disk.c to support multiple disksZhihong Chen
Signed-off-by: Zhihong Chen <[email protected]>
2026-08-19[update] port: hpmicro: remove sdk version checkZhihong Chen
Signed-off-by: Zhihong Chen <[email protected]>
2026-08-19[update] platform: zephyr: add MSC application lifecycle hooksZhihong Chen
- Add weak usbh_msc_app_run() and usbh_msc_app_stop() callbacks to the Zephyr MSC disk adapter. - Invoke the application start callback after registering the disk and the stop callback before unregistering it, allowing samples to mount and unmount filesystems without modifying the CherryUSB class driver. Signed-off-by: Zhihong Chen <[email protected]>
2026-08-19[fix] osal: defer Zephyr thread memory releaseZhihong Chen
- The system workqueue may preempt a self-deleting thread after the release work is submitted. Waiting for the thread with k_thread_join() before freeing its TCB and stack prevents use-after-free corruption. - Also handle release work allocation failure before aborting the thread. Signed-off-by: Zhihong Chen <[email protected]>
2026-08-17feat(class/cdc/usbd_ncm): 添加usb device ncm功能 (#433)54fire
* 添加usb device ncm功能 * fix(class/cdc/usbd_ncm): address review findings - fix compile failure when CONFIG_USBDEV_CDC_NCM_USING_LWIP is disabled - fix GET/SET_NTB_INPUT_SIZE operating on the OUT direction size, and honor the negotiated IN limit in the transmit path - set tx busy flag before submitting the transfer to avoid a race that could block transmit permanently - follow the ndp chain via wNextNdpIndex so chained datagrams are not dropped, and access ntb fields with LE helpers instead of assuming a little-endian target - reject oversized frames instead of transmitting truncated ones - register endpoints only once when initializing both interfaces - wait for tx completion with a timeout in the demo instead of an unbounded busy wait - make usbd_cdc_ncm.h self-contained Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
2026-08-14fix(port/ch32): fix ch32 macro and readmesakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-12fix(ch32fs): SETUP 中断固定 NAK EP0,支持 CH32L103xiaowine
CH32FS IP 的 SETUP 中断触发时,INT_ST 端点字段不总为 0(在 CH32L103 和 CH32V203 上实测约 50% 为 4,来自上一次批量事务的残留)。原代码 USB_SET_RX_CTRL(ep_idx, NAK) 会写错 UEP{ep_idx} 寄存器,导致 EP0 停留在 ACK 状态,Windows 存储栈挂载设备前会卡约 20 秒。 (可能影响所有使用 CH32FS IP 的 MCU,但仅在 CH32L103/CH32V203 上验证) 改为固定 NAK EP0(索引 0),并同时 NAK TX 和 RX。其中 TX NAK 一行对 CH32L103 是必需的,缺少会导致设备枚举失败(Windows 设备管理器 Code 10); WCH CH32FS IP 的 MCU 官方 EVM 代码也都是同时两行 NAK,且官方 SETUP 处理代码同样固定使用 EP0(索引 0)。 同时在支持列表中加入 CH32L103(使用 USBFS)。CH32V20X 有两个 USB IP: USBD(用 fsdev,与 F103 相同)和 USBFS(用 ch32fs),已在 port/ch32/README.md 中说明。
2026-08-05update(class/serial): add rx overflow controlsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-03fix(security): add check for sem&mq&thread and delete remain sources if ↵sakumisu
alloc fail Signed-off-by: sakumisu <[email protected]>
2026-07-31fix(idf): support legacy FatFS VFS registration APIyanke
2026-07-25fix(security): fix adb len checksakumisu
Signed-off-by: sakumisu <[email protected]>
2026-07-24[update] audio: add ↵Zhihong Chen
AUDIO_FEEDBACK_TO_BUF_HS_INTERVAL/AUDIO_FEEDBACK_TO_BUF_FS_INTERVAL macros Signed-off-by: Zhihong Chen <[email protected]>
2026-07-17fix(usbh): bounds-check cur_ep before writing ep[] in ↵yi chen
parse_config_descriptor (#426) * fix(usbh): check cur_ep against CONFIG_USBHOST_MAX_ENDPOINTS before writing ep[] parse_config_descriptor() checks cur_ep_num (the interface descriptor's self-declared bNumEndpoints) against CONFIG_USBHOST_MAX_ENDPOINTS when the INTERFACE descriptor is parsed, but cur_ep (the actual write index, incremented once per ENDPOINT sub-descriptor encountered in the byte stream) is never bounds-checked in the USB_DESCRIPTOR_TYPE_ENDPOINT case before the memcpy. A non-conformant or malicious device can declare a small bNumEndpoints while still emitting more ENDPOINT descriptors than declared in the raw config descriptor byte stream, causing cur_ep to exceed CONFIG_USBHOST_MAX_ENDPOINTS and the memcpy to write past the ep[] array, past altsetting[], and potentially past the whole usbh_configuration struct. Add the same bounds check pattern already used for cur_iface and cur_alt_setting two cases above, applied to cur_ep before the memcpy. * Allow interfaces to use configured capacity Endpoint counts are quantities, so a declaration equal to the endpoint array capacity is valid. The per-index guard still rejects descriptors that contain more endpoint records than the storage can hold. Constraint: Preserve the new cur_ep index guard Confidence: high Scope-risk: narrow Tested: Real parser matrix for declared/actual 3/3, 4/4, 5/5, and 3/5; MinGW and WSL GCC13 ASan+UBSan Not-tested: Physical USB device enumeration
2026-07-15update(gamepad): update xinput report and descsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-07-14fix(security): check desc len overflowsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-07-12update(chore): add clang-tidysakumisu
Signed-off-by: sakumisu <[email protected]>
2026-07-12update(security): check null pointer and overflowsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-07-12update(osal): remove logsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-07-02update(tools): update usb speed testsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-30feat(platform): add zmk supportsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-30update(tool): update test_cdc_speed.py with argssakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-30fix(ci): fix ci buildsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-30update(port/musb/usb_glue_sifli): add zephyr supportsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-30fix(port/chipidea): using sutw semaphore by isr handler for setupsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-30fix: fix warningssakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-30update(port/dwc2): add limit for transfer sizesakumisu
Signed-off-by: sakumisu <[email protected]>