Skip to content

Add Host HID APIs to set/get protocol and and optional device HID changes protocol callback#244

Open
ayedm1 wants to merge 2 commits intoeclipse-threadx:devfrom
ayedm1:add_set_get_host_hid_api
Open

Add Host HID APIs to set/get protocol and and optional device HID changes protocol callback#244
ayedm1 wants to merge 2 commits intoeclipse-threadx:devfrom
ayedm1:add_set_get_host_hid_api

Conversation

@ayedm1
Copy link
Contributor

@ayedm1 ayedm1 commented Jan 18, 2026

This pull request adds host HID API functions to get and set the HID protocol (boot vs report mode) and introduces an optional callback for the device side when the protocol changes.

  • Added new host-side APIs ux_host_class_hid_protocol_set() and ux_host_class_hid_protocol_get() with error checking wrappers.
  • Added device-side optional callback ux_device_class_hid_set_protocol_callback that is invoked when the protocol changes
  • Added comprehensive test to verify the new protocol callback functionality

@ayedm1 ayedm1 requested review from ABOUSTM and rahmanih January 18, 2026 13:35
@ayedm1 ayedm1 moved this to In review in ThreadX Roadmap Jan 18, 2026
@ayedm1 ayedm1 added the feature New feature or enhancement request label Jan 18, 2026
@fdesbiens fdesbiens changed the base branch from master to dev February 5, 2026 21:36
Copy link
Contributor

@rahmanih rahmanih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, this PR implements 2 features in HID Device and Host Classes.
please split them in separate commits.

@ayedm1
Copy link
Contributor Author

ayedm1 commented Feb 9, 2026

IIRC, this PR implements 2 features in HID Device and Host Classes. please split them in separate commits.

in the simulator test, i test the callback with new apis

@rahmanih
Copy link
Contributor

the regression test updates can be made in a separate commit too.

@rahmanih rahmanih changed the title Add optional device hid changes protocol callback and host hid api to set/get protocol Add Host HID APIs to set/get protocol and and optional device HID changes protocol callback Feb 13, 2026
@ayedm1 ayedm1 force-pushed the add_set_get_host_hid_api branch 4 times, most recently from 0f90e31 to b024452 Compare February 24, 2026 22:31
@ayedm1 ayedm1 marked this pull request as draft February 24, 2026 22:43
@ayedm1 ayedm1 force-pushed the add_set_get_host_hid_api branch from b024452 to 6ea0ac4 Compare March 3, 2026 23:45
@ayedm1 ayedm1 marked this pull request as ready for review March 3, 2026 23:46
@ayedm1
Copy link
Contributor Author

ayedm1 commented Mar 3, 2026

How to test:

1- Update middleware
2- Open x-cube-azrtos-h7 HID Host RTOS and Standalone project
3- Copy content of attached app_usbx_host.c

@ayedm1 ayedm1 force-pushed the add_set_get_host_hid_api branch 2 times, most recently from ea1f53c to 9032773 Compare March 4, 2026 11:53
… set/get protocol

This pull request adds host HID API functions to get and set the HID protocol (boot vs report mode) and introduces an optional callback for the device side when the protocol changes.

- Added new host-side APIs ux_host_class_hid_protocol_set() and ux_host_class_hid_protocol_get() with error checking wrappers.
- Added device-side optional callback ux_device_class_hid_set_protocol_callback that is invoked when the protocol changes
- Added comprehensive test to verify the new protocol callback functionality
@ayedm1 ayedm1 force-pushed the add_set_get_host_hid_api branch from 9032773 to 63a0d44 Compare March 4, 2026 11:57
@ayedm1 ayedm1 requested a review from rahmanih March 5, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or enhancement request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants