summaryrefslogtreecommitdiff
path: root/examples/host/bare_api
AgeCommit message (Collapse)Author
2026-06-12bare_api: cast config-descriptor buffer via uintptr_t instead of suppressing ↵Claude
V641 temp_buf is a uint16_t[128] reused to hold the GET_DESCRIPTOR(Configuration) wire-format blob; casting it to tusb_desc_configuration_t* to read the 9-byte header tripped PVS V641 (buffer size not a multiple of the element size). Route the cast through uintptr_t so the (correct) header read no longer trips the size-ratio heuristic, dropping the inline //-V641 suppression. Verified: pico examples rebuild; single-TU PVS re-run on bare_api/main.c is clean (no V641, no MISRA pointer/integer-cast finding).
2026-06-11clean up PVS-Studio static-analysis findings for raspberry_pi_picoClaude
Resolves all TinyUSB-owned alerts reported by the CI PVS-Studio job (static_analysis.yml, run with --security-related-issues) on the raspberry_pi_pico board: 0 remaining in src/ and examples/. Genuine fixes: - ncm_device: validate wNdpIndex against sizeof(nth16_t), not the pointer size sizeof(nth16) (4 bytes) — the latter under-checks the NTB header (V568). - tusb: drop the redundant `ff_buf != NULL && ff_bufsize > 0` guard in tu_edpt_stream_init(); the early return already guarantees it (V560). - midi_host: bounds-check idx in tuh_midi_itf_get_info() instead of the always-true `&_midi_host[idx]` pointer (V560). - examples: fully initialize resolutions_per_format / frame_num / interval_ms arrays instead of leaving trailing elements implicitly zero (V1009). False positives suppressed at the cause: - usbd/usbh: hide the weak dcd_deinit()/hcd_deinit() stubs from the analyzer with #ifndef PVS_STUDIO. PVS analyzes one TU at a time and binds the call to the always-false weak stub (it cannot model the linker selecting the port's strong definition), then reports the cleanup loop after TU_ASSERT(...deinit()) as unreachable (V779). False positives suppressed locally (inline //-V or .pvsconfig): - .pvsconfig: V501 (HID descriptor macros), V763 (rhport override), V785 (audio function-index switch), V1044 (hardware poll loops). - inline //-V for config-dependent or intentional constructs: V512, V514-style contiguous clears, V547, V557, V560, V614, V619, V641, V1008, V1037, V1048, V1086. Verified: all examples build for raspberry_pi_pico; ceedling test:all passes (60/60); re-run of the CI-exact PVS invocation reports zero TinyUSB-owned findings.
2026-06-11Merge remote-tracking branch 'origin/master' into stm32c5hathach
# Conflicts: # README.rst
2026-05-28remove sync() in tinyusb callback since it cause issue with RTOS when usbh ↵hathach
task is blocking
2026-05-10add stm32c5 supportHiFiPHile
Signed-off-by: HiFiPHile <[email protected]>
2026-03-06fix CIHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-03-06Merge remote-tracking branch 'tinyusb/master' into hcd_ip3516HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-03-05add IAR warning flags to cmake build and fix themhathach
2026-02-28replace board_millis() with tusb_time_millis_api()hathach
2025-12-19clean up cmake, remove family_get_project_name()hathach
2025-12-16Merge remote-tracking branch 'tinyusb/master' into support-nxp-rw612HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-12-16Merge remote-tracking branch 'tinyusb/master' into support-nxp-rw612Zixun LI
Signed-off-by: Zixun LI <[email protected]>
2025-12-16example: host: support hpmicro familyZhihong Chen
Signed-off-by: Zhihong Chen <[email protected]>
2025-12-15minor clean uphathach
2025-12-14bsp: nxp: add support for RW612 (FRDM-RW612)gab-k
- Added `rw61x` family support. - Added `frdm_rw612` board support. - Update `get_deps.py` to include mcux-sdk for RW61x. - Add ci_hs_rw61x include to ChipIdea HS driver and enable host examples.
2025-12-13example/bare_api: move buffer into USB sectionHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-12-13update LPC54HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-12-13bsp/lpc55: add hcd_ip3516HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-11-27bsp/stm32h5: support host modeHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-11-25fsdev: reorganize functionsHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-10-14more make refactorhathach
2025-10-14move make.mk to hw/bsp/family_support.mkhathach
2025-09-17Fix board_init_after_tusbHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-07-09add board_vbus_set() for samd21/d51 to enable usb host vbushathach
enable host example build for samd21/d51
2025-07-05enable ci host and dual build for ch32v20xhathach
2025-06-12Merge branch 'master' into fork/james-advatek/stm32n657nucleohathach
2025-06-04chore: squash previous commits from other branchesJames Sandison
2025-04-22include h7rs in host examples.HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-03-25add tuh_edpt_close() API, it will abort any pending transferhathach
implement hcd_edpt_close() for pio-usb and max3421e, also move max3421e api into its own header.
2025-03-06fix(dwc2) host driver conflict with max3421ehathach
2025-02-09Add CMake presets.HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-01-21bump up cmake min to 3.20hathach
2024-11-07update bsp for h7 to support host modehathach
2024-10-14change the tusb_rhport_init_t struct, exclude the rhport to make API more ↵hathach
consistent
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-06-18add host/device_info examplehathach
2024-04-26Merge pull request #2609 from tyustli/patch-1HiFiPhile
Remove redundant header file includes for the hid class
2024-04-25fix ci errortyustli
2024-04-22fix print lu format warnings with clanghathach
2024-03-04correct rp2040 host with max3421hathach
2023-12-26allow rp2040 to use max3421e as host controllerhathach
- fix warnings build hcd max3421 with rp2040 - add tinyusb_host_max3421 target for rp2040 cmake, -DMAX3421_HOST=1 will enable this - add max3421 driver implementation for rp2040 family - update tusb_config for host to allow easy enable host selection for rp2040 (default/pio-usb/max3421)
2023-11-23move make.mk and rules.mk to build_system/makehathach
2023-09-28fix build with new freertos host examplehathach
2023-09-27Merge branch 'master' into add-max3421-esp32hathach
2023-09-27change hcd_int_handler(rhport, in_isr) signature: add in_isrhathach
change tuh_int_handler() to take in_isr as optional parameter (default = true)
2023-09-25adding host/cdc_msc_hid_freertos examplehathach
2023-09-11wrap up build cmake & make support for max3421, to enable the Host driver, ↵hathach
'MAX3421_HOST=1' must be added as part of make/cmake command
2023-08-07Merge pull request #2151 from kilograham/rp2040_build_fixesHa Thach
Fix build issues when building for RP2040 from pico-examples/pico-sdk.
2023-08-04Merge pull request #2204 from hathach/enhance-bspHa Thach
Enhance bsp