summaryrefslogtreecommitdiff
path: root/src/class/hid/hid_device.c
AgeCommit message (Collapse)Author
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.
2025-10-22Add is_isr parameter to usbd_edpt_xfer and usbd_edpt_xfer_fifocopilot-swe-agent[bot]
- Added bool is_isr parameter to usbd_edpt_xfer() and usbd_edpt_xfer_fifo() wrapper functions - These are called by class drivers to queue USB transfers - Updated all callers to pass false by default (non-ISR context) - Updated audiod_rx_xfer_isr() and audiod_tx_xfer_isr() to pass true (ISR context) - All 21 unit tests pass Co-authored-by: HiFiPhile <[email protected]>
2024-12-23add hid stylus pen device.Jay
this works with android, for bypassing that absmouse does not support android. note that, to hide cursor on android for every touch signal, find cursor option in android settings menu. references: 1. https://stackoverflow.com/questions/28536602/hid-digitizer-descriptor-doesnt-perform-well-with-landscape-orientation 2. https://github.com/jonathanedgecombe/absmouse/blob/master/src/AbsMouse.cpp
2024-11-22apply TUD_EPBUF_DEF for device: bth, dfu, hid, mschathach
2024-11-21make sure usb buffer occupies whole cache line when DCACHE is enabled for ↵hathach
msc,cdc,hid HIL enable device DMA for p4
2024-08-09Marked the keycode parameter of the keyboard_report functions as const since ↵Hjalmar
the functions don't modifies the value
2024-07-17minor update hid devicehathach
2024-07-17follow up to #2253hathach
- rename tud_hid_report_fail_cb() to tud_hid_report_failed_cb() and change its signature - use default implementation for hid callbacks to be compatible with keil compiler - code format
2024-04-26Code format.HiFiPhile
2024-04-26Merge remote-tracking branch 'remotes/tinyusb/master' into pr/2253HiFiPhile
2024-04-26Simplify transfer failure cb.HiFiPhile
2024-04-26Add missing alignment.HiFiPhile
2024-04-26use separate buffer for ctrl transfer.HiFiPhile
2024-04-26Merge branch 'master' of https://github.com/hathach/tinyusb into pr/2283HiFiPhile
2024-04-08Merge pull request #1835 from MasterQ32/otg_bringupHa Thach
Implements deinit functions for host/device mode switch
2024-04-08add class driver deinithathach
2024-04-08Merge pull request #1363 from tobozo/masterHa Thach
HID Mouse with absolute positioning
2023-10-17hid_device: use separate buffer for SET_REPORT instead of epoutShawn Hoffman
2023-09-13Fixing warningRocky04
2023-09-13Error handling on transferRocky04
2023-07-24rename CFG_TUSB_MEM_SECTION to CFG_TUD_MEM_SECTION in device stackhathach
CFG_TUD_MEM_SECTION is default to CFG_TUSB_MEM_SECTION
2023-03-30Added helpers for abs_mouse_reporttobozo
2023-02-27Merge pull request #1852 from silvergasp/mem_sHa Thach
fix: Replace device calls to memcpy with tu_memcpy_s
2023-02-27minor clean uphathach
2023-02-22use tu_static instead of static _fuzz_threadhathach
2023-02-22Merge pull request #1867 from silvergasp/thread_local_globalsHa Thach
fix: Change all static variables to thread when fuzzing
2023-02-22rename maros from FUZZ to _FUZZ, change TU_STATIC to static _fuzz_threadhathach
2023-02-04change length in tud_hid_report_complete_cb() from uint8 to uint16hathach
2023-01-20fix: Change all static variables to thread when fuzzingNathaniel Brough
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-07-17temporarily revert len back to uint8_t in tud_hid_report_complete_cb() for ↵hathach
up coming release
2022-06-27Merge branch 'master' into add-more-warningshathach
2022-06-27change report len in hid API from uint8_t to uint16_thathach
since HS interrupt endpoint can be up to 1024, 8-bit is not enough. affected APIs are: - tud_hid_n_report() / tud_hid_report() - tud_hid_report_complete_cb()
2022-06-27fix most warnings with rp2040 -wconversionhathach
2022-06-02rhport argument in usbd_ API() is not used (always use the initialized port)hathach
remove the usage of TUD_OPT_RHPORT in class driver
2022-02-25rename TUSB_OPT_DEVICE_ENABLED to CFG_TUD_ENABLEDhathach
TUSB_OPT_DEVICE_ENABLED still usable for backward compatible
2021-10-15fix -Wcast-qualhathach
2021-09-13Enforced buffer boundaries for hid devicesszymonh
2021-08-17fix keyboard report reserved is always 0hathach
2021-07-01clean uphathach
2021-07-01better support for hid device set/get protocolhathach
add caplock detection for hid_composite
2021-06-09update gamepad helperhathach
2021-06-02clean up loghathach
2021-05-27include clean uphathach
2021-05-23change hid device internal boot_mode to protocol_modehathach
2021-05-18fix build errorhathach
2021-05-18update to use HID spec protocol value for get/set_protocol()hathach
2021-05-18clean up, rename some HID device symbol/APIhathach
- add tud_hid_n_interface_protocol() - rename tud_hid_n_boot_mode() to tud_hid_n_get_protocol() - rename tud_hid_boot_mode_cb() to tud_hid_set_protocol_cb() - add HID_PROTOCOL_BOOT/REPORT to avoid magic number 0,1 - rename HID_PROTOCOL_NONE/KEYBOARD/MOUSE to HID_ITF_PROTOCOL_ to avoid confusion
2021-02-24add itf argument to hid API to support multiple instanceshathach
following API signature is changed: - tud_hid_descriptor_report_cb() - tud_hid_get_report_cb() - tud_hid_set_report_cb() - tud_hid_boot_mode_cb() - tud_hid_set_idle_cb()
2021-02-09tud_hid_report_complete_cb() APIhathach
update hid composite to make use of tud_hid_report_complete_cb() for sending reports when possible.