From bdc4706cc700ae1c0a4520e252897bb0e03c327b Mon Sep 17 00:00:00 2001 From: Hyx Date: Fri, 1 Aug 2025 12:53:01 +0800 Subject: [PATCH] usb-device-hid: Return True after submit_xfer. This tells the caller that no error has occurred. The child classes can use this state to do double buffering correctly. If any fundamental error occurs in submit_xfer, the underlying code will raise an exception. Signed-off-by: Hyx --- micropython/usb/usb-device-hid/manifest.py | 2 +- micropython/usb/usb-device-hid/usb/device/hid.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/micropython/usb/usb-device-hid/manifest.py b/micropython/usb/usb-device-hid/manifest.py index af9b8cb8..4520325e 100644 --- a/micropython/usb/usb-device-hid/manifest.py +++ b/micropython/usb/usb-device-hid/manifest.py @@ -1,3 +1,3 @@ -metadata(version="0.1.0") +metadata(version="0.1.1") require("usb-device") package("usb") diff --git a/micropython/usb/usb-device-hid/usb/device/hid.py b/micropython/usb/usb-device-hid/usb/device/hid.py index 9e4c70dd..1c1c9ac6 100644 --- a/micropython/usb/usb-device-hid/usb/device/hid.py +++ b/micropython/usb/usb-device-hid/usb/device/hid.py @@ -123,6 +123,7 @@ class HIDInterface(Interface): if not self.is_open(): return False self.submit_xfer(self._int_ep, report_data) + return True def desc_cfg(self, desc, itf_num, ep_num, strs): # Add the standard interface descriptor