8000 shared-bindings/usb_hid: add wakeup documentation · adafruit/circuitpython@6ea618f · GitHub
[go: up one dir, main page]

Skip to content

Commit 6ea618f

Browse files
committed
shared-bindings/usb_hid: add wakeup documentation
1 parent 9aa73fd commit 6ea618f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

shared-bindings/usb_hid/Device.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
//| in_report_lengths=(5, 2),
7373
//| out_report_lengths=(6, 0),
7474
//| )
75+
//|
76+
//| The HID device is able to wake up a suspended (sleeping) host computer.
77+
//| See `send_report()` for details.
7578
//| """
7679
//| ...
7780
//| KEYBOARD: Device
@@ -166,6 +169,16 @@ STATIC mp_obj_t usb_hid_device_make_new(const mp_obj_type_t *type, size_t n_args
166169
//| """Send an HID report. If the device descriptor specifies zero or one report id's,
167170
//| you can supply `None` (the default) as the value of ``report_id``.
168171
//| Otherwise you must specify which report id to use when sending the report.
172+
//|
173+
//| If the USB host is suspended (sleeping), then `send_report()` will request that the host wake up.
174+
//| The `report` itself will be discarded, to prevent unwanted extraneous characters,
175+
//| mouse clicks, etc.
176+
//|
177+
//| Note: Host operating systems allow enabling and disabling specific devices
178+
//| and kinds of devices to do wakeup.
179+
//| The defaults are different for different operating systems.
180+
//| For instance, on Linux, only the primary keyboard may be enabled.
181+
//| In addition, there may be USB wakeup settings in the host computer BIOS/UEFI.
169182
//| """
170183
//| ...
171184
STATIC mp_obj_t usb_hid_device_send_report(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

0 commit comments

Comments
 (0)
0