<feed xmlns='http://www.w3.org/2005/Atom'>
<title>usbx.git/common/usbx_host_classes/CMakeLists.txt, branch dev</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/usbx.git/atom/common/usbx_host_classes/CMakeLists.txt?h=dev</id>
<link rel='self' href='http://cgit.235523.xyz/usbx.git/atom/common/usbx_host_classes/CMakeLists.txt?h=dev'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/'/>
<updated>2026-06-04T19:25:54Z</updated>
<entry>
<title>Added optional device HID protocol change callback and host HID protocol get/set API (#244)</title>
<updated>2026-06-04T19:25:54Z</updated>
<author>
<name>MAY</name>
<email>81168645+ayedm1@users.noreply.github.com</email>
</author>
<published>2026-06-04T19:25:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=35927220c0165c06dc90e6c9aa7a8eb9b5806065'/>
<id>urn:sha1:35927220c0165c06dc90e6c9aa7a8eb9b5806065</id>
<content type='text'>
This pull request adds host-side HID API functions to get and set the HID protocol (boot vs. report mode), and introduces an optional device-sidecallback invoked when the protocol changes.

New features

 - Added host-side APIs ux_host_class_hid_protocol_set() and ux_host_class_hid_protocol_get() with error-checking wrappers (_uxe_ variants).
 - Added optional device-side callback ux_device_class_hid_set_protocol_callback, invoked when the host changes the active protocol.
 - Added a comprehensive test to verify the new protocol callback functionality.

Bug fixes (host-side protocol get/set)

 1. DMA buffer safety (protocol_get): The received byte is now written into a cache-safe allocated buffer instead of the caller's USHORT* directly. Stack memory is not DMA-safe on cache-incoherent embedded targets, and writing 1 byte into a USHORT* yields incorrect results on big-endianplatforms. Follows the same pattern as ux_host_class_hid_idle_get.
 2. Missing device protection semaphore (both functions): In RTOS mode, ux_device_protection_semaphore is now acquired before submitting the transfer, in addition to the HID instance semaphore. All other HID control transfer functions (idle_get, idle_set) take both semaphores; omitting it allowed concurrent callers to corrupt the shared transfer_request fields.
 3. Missing standalone locking (both functions): Added proper UX_HOST_STANDALONE support using UX_DISABLE/UX_RESTORE to atomically check and setUX_HOST_CLASS_HID_FLAG_LOCK and UX_DEVICE_FLAG_LOCK, and set UX_TRANSFER_FLAG_AUTO_DEVICE_UNLOCK + UX_TRANSFER_STATE_RESET on the transfer request before initiating. Follows the idle_get inline standalone pattern.

Co-authored-by: Frédéric Desbiens &lt;frederic.desbiens@eclipse-foundation.org&gt;
Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Release 6.1.12</title>
<updated>2022-07-26T02:07:18Z</updated>
<author>
<name>Yuxin Zhou</name>
<email>yuxzho@microsoft.com</email>
</author>
<published>2022-07-26T02:07:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=cd55ec74569aa3fbfbd8f02d025a47c5a51a285a'/>
<id>urn:sha1:cd55ec74569aa3fbfbd8f02d025a47c5a51a285a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Release 6.1.10</title>
<updated>2022-01-26T23:54:01Z</updated>
<author>
<name>Yuxin Zhou</name>
<email>yuxzho@microsoft.com</email>
</author>
<published>2022-01-26T23:54:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=8f56ef4e4492dd66c2161b7c1534c6f4442852a4'/>
<id>urn:sha1:8f56ef4e4492dd66c2161b7c1534c6f4442852a4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Release 6.1.4</title>
<updated>2021-02-02T00:52:59Z</updated>
<author>
<name>Yuxin Zhou</name>
<email>yuxzho@microsoft.com</email>
</author>
<published>2021-02-02T00:52:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=5d2acef877e3a9215ef495bf350fbceb06349bb5'/>
<id>urn:sha1:5d2acef877e3a9215ef495bf350fbceb06349bb5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>6.1 Release</title>
<updated>2020-10-09T19:39:54Z</updated>
<author>
<name>Scott Larson</name>
<email>sclarson@microsoft.com</email>
</author>
<published>2020-10-09T19:39:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=3f1e20df866441bd7e3e8a45fffe1d5ab0413002'/>
<id>urn:sha1:3f1e20df866441bd7e3e8a45fffe1d5ab0413002</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initial commit</title>
<updated>2020-05-11T15:03:23Z</updated>
<author>
<name>PProvost</name>
<email>peter@provost.org</email>
</author>
<published>2020-05-11T15:03:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=15044435fb627392d1b361e10ae9b2d54d76dec6'/>
<id>urn:sha1:15044435fb627392d1b361e10ae9b2d54d76dec6</id>
<content type='text'>
</content>
</entry>
</feed>
