<feed xmlns='http://www.w3.org/2005/Atom'>
<title>usbx.git, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/usbx.git/atom/?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/usbx.git/atom/?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/'/>
<updated>2026-06-30T21:32:53Z</updated>
<entry>
<title>Merge pull request #270 from fdesbiens/update/security-policy</title>
<updated>2026-06-30T21:32:53Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-06-30T21:32:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=ea1c406eabcd3937e64552a5cbe57b3dc0bb72dc'/>
<id>urn:sha1:ea1c406eabcd3937e64552a5cbe57b3dc0bb72dc</id>
<content type='text'>
Updated security policy</content>
</entry>
<entry>
<title>Updated security policy</title>
<updated>2026-06-30T21:29:08Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-06-30T21:29:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=0997465552b0cc254a6ec3889cb621204af48191'/>
<id>urn:sha1:0997465552b0cc254a6ec3889cb621204af48191</id>
<content type='text'>
Co-authored-by: Codex &lt;codex@openai.com&gt;
</content>
</entry>
<entry>
<title>Merge pull request #268 from eclipse-threadx/dev</title>
<updated>2026-06-08T08:06:16Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-06-08T08:06:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=359977dd98d797fa3c93d0dda71cdbb29820fdc1'/>
<id>urn:sha1:359977dd98d797fa3c93d0dda71cdbb29820fdc1</id>
<content type='text'>
Merging changes for the v.6.5.1.202602 release</content>
</entry>
<entry>
<title>Added copyright headers to files missing them</title>
<updated>2026-06-06T19:48:22Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-06-06T19:42:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=d0d46fd2418f3c1f9a29aeb8b3e3af53cb773dbf'/>
<id>urn:sha1:d0d46fd2418f3c1f9a29aeb8b3e3af53cb773dbf</id>
<content type='text'>
Applied the standard MIT license header to all project-owned C, header,
assembly, shell, and Python files that were missing a copyright notice.
Third-party, toolchain startup, and auto-generated files were excluded.

Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>Release 6.5.1.202602 preparation (#267)</title>
<updated>2026-06-04T21:23:53Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-06-04T21:23:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=9b8fac9601d1d83e79a1c4e3f48ea4beefd2dea7'/>
<id>urn:sha1:9b8fac9601d1d83e79a1c4e3f48ea4beefd2dea7</id>
<content type='text'>
* Updated version number constants

* Updated port version strings

---------

Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Added a release preparation script (#266)</title>
<updated>2026-06-04T21:17:11Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-06-04T21:17:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=8fecc58869bf3f53d76e91c72a6a265c9ac40a10'/>
<id>urn:sha1:8fecc58869bf3f53d76e91c72a6a265c9ac40a10</id>
<content type='text'>
Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>fix(hid): fixed memory leak and double-free in keyboard/mouse/remote_control client lifecycle (#265)</title>
<updated>2026-06-04T20:57:57Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-06-04T20:57:57Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=fa5ac39d6bfb5961cf1fb48c13e31e96c5665bdd'/>
<id>urn:sha1:fa5ac39d6bfb5961cf1fb48c13e31e96c5665bdd</id>
<content type='text'>
PR #262 introduced per-instance UX_HOST_CLASS_HID_CLIENT allocation in
client_search.c. However, keyboard/mouse/remote_control activate handlers
already embed a UX_HOST_CLASS_HID_CLIENT inside their own combined
allocation (e.g. UX_HOST_CLASS_HID_CLIENT_KEYBOARD), override
hid-&gt;hid_client with the embedded copy, and then free the entire combined
struct (as 'keyboard_instance', the first field) during deactivation.

This created two bugs:

1. Memory leak: the per-instance copy from client_search was abandoned
   when activate handlers replaced hid-&gt;hid_client with their embedded
   copy.

2. Double-free / UX_MEMORY_CORRUPTED: deactivate.c freed hid-&gt;hid_client
   after calling the handler, but for keyboard/mouse/remote_control the
   deactivate handler had already freed the entire combined allocation
   (which contains the embedded hid_client), causing a second free of a
   pointer into the middle of a now-freed block.

Fix:
- keyboard/mouse/remote_control activate: free the per-instance copy from
  client_search before overriding hid-&gt;hid_client with the embedded one.
- keyboard/mouse/remote_control deactivate: null hid-&gt;hid_client after
  freeing the combined struct, signalling that cleanup is done.
- deactivate.c: re-check hid_client != NULL after calling the handler
  before freeing; keyboard/mouse/remote_control will have nulled it,
  simple clients will not.
- keyboard/mouse ACTIVATE_WAIT error paths (standalone): null
  hid-&gt;hid_client after freeing the combined struct so that the generic
  cleanup in entry.c skips the already-freed pointer.
- entry.c standalone ACTIVATE_WAIT error: guard the free with a NULL
  check to safely handle both cases.

Discovered while investigating test failures introduced by PR #262.
All 430 tests pass after this fix.

Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>fix(hid): Store client instance per-device instead of per-class (#262)</title>
<updated>2026-06-04T20:03:06Z</updated>
<author>
<name>Kajtek Lau</name>
<email>kajtek.lau@gmail.com</email>
</author>
<published>2026-06-04T20:03:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=a5fd35face7c364b00fd2fdecbac0c3ca45f659b'/>
<id>urn:sha1:a5fd35face7c364b00fd2fdecbac0c3ca45f659b</id>
<content type='text'>
* fix(hid): Store client instance per-device instead of per-class

* Address review feedback on per-instance HID client copy

Three issues fixed, discovered during maintainer review:

1. Memory leak in standalone activation error path (entry.c):
   _ux_host_class_hid_client_activate_wait() set hid_client to NULL
   without freeing the per-instance copy allocated in client_search.
   The HID_ENUM_ERROR handler destroys the hid struct without freeing
   hid_client, so the copy was leaked on every standalone activation
   failure. Fixed by freeing hid_client before clearing it.

2. Variable declared inside if-block (client_search.c):
   hid_client_instance was declared inside the if (status == UX_SUCCESS)
   block, which is a C99 feature. USBX targets C89/C90 embedded
   toolchains. Moved to the top of the function with other locals.

3. Trailing whitespace throughout both changed files:
   The PR introduced trailing spaces on most comment-block lines.
   Reverted all affected lines to their original whitespace.

Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;

---------

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>Fixed standalone locking bugs in HID host idle get/set (#264)</title>
<updated>2026-06-04T19:45:21Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-06-04T19:45:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/usbx.git/commit/?id=94cdd1e0e34573dac3f2c5dadb1c4f68a2857435'/>
<id>urn:sha1:94cdd1e0e34573dac3f2c5dadb1c4f68a2857435</id>
<content type='text'>
Two issues discovered while reviewing and fixing thread-safety issues in
the new ux_host_class_hid_protocol_get/set functions (PR #244).

1. idle_get.c: wrong operator acquires no lock in standalone mode

   Line 104 used '&amp;= ~UX_HOST_CLASS_HID_FLAG_LOCK' (the release/clear
   operation) instead of '|= UX_HOST_CLASS_HID_FLAG_LOCK' (acquire/set).
   The preceding check correctly returns UX_BUSY when the flag is set,
   but the follow-on line then immediately clears it instead of setting it.
   The net effect is that the HID instance is never actually locked in
   UX_HOST_STANDALONE mode, making the mutual-exclusion check a no-op.

2. idle_set.c: standalone path used a blocking spin-loop

   The standalone branch called _ux_host_class_hid_idle_set_run() in a
   do/while loop, blocking the caller until the transfer completed. This
   is inconsistent with every other inline HID control-transfer function
   (idle_get, report_get, report_set, protocol_get, protocol_set) which
   all use the direct UX_DISABLE/UX_RESTORE atomic flag pattern and
   return UX_BUSY if the instance or device endpoint is already locked.

   Replaced with the same inline standalone locking pattern used by the
   other functions: atomic HID FLAG_LOCK acquire, atomic DEVICE_FLAG_LOCK
   acquire with AUTO_DEVICE_UNLOCK + UX_TRANSFER_STATE_RESET, and an
   AUTO_WAIT check at completion consistent with idle_get behavior.

Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;</content>
</entry>
<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>
</feed>
