Skip to content

Commit 76ce46a

Browse files
committed
shared-bindings/usb_hid: Fix docs for Device.get_last_received_report()
Update documentation for Device.get_last_received_report() fixing type signature and adding note on "consume" behavior.
1 parent b481411 commit 76ce46a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shared-bindings/usb_hid/Device.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,11 @@ STATIC mp_obj_t usb_hid_device_send_report(size_t n_args, const mp_obj_t *pos_ar
191191
}
192192
MP_DEFINE_CONST_FUN_OBJ_KW(usb_hid_device_send_report_obj, 1, usb_hid_device_send_report);
193193

194-
//| def get_last_received_report(self, report_id: Optional[int] = None) -> bytes:
194+
//| def get_last_received_report(self, report_id: Optional[int] = None) -> Optional[bytes]:
195195
//| """Get the last received HID OUT or feature report for the given report ID.
196196
//| The report ID may be omitted if there is no report ID, or only one report ID.
197-
//| Return `None` if nothing received.
197+
//| Return `None` if nothing received. After returning a report, subsequent calls
198+
//| will return `None` until next report is received.
198199
//| """
199200
//| ...
200201
//|

0 commit comments

Comments
 (0)