Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update usb_hid boot device documentation #9836

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions shared-bindings/usb_hid/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ MP_DEFINE_CONST_FUN_OBJ_0(usb_hid_disable_obj, usb_hid_disable);
//|
//| **Boot Devices**
//|
//| Boot devices implement a fixed, predefined report descriptor, defined in
//| https://www.usb.org/sites/default/files/hid1_12.pdf, Appendix B. A USB host
//| can request to use the boot device if the USB device says it is available.
//| Usually only a BIOS or other kind of limited-functionality
//| host needs boot keyboard support.
//| A USB HID boot device implements a fixed, predefined report descriptor,
//| as defined in https://www.usb.org/sites/default/files/hid1_12.pdf, Appendix B.
//| Currently the only HID boot devices defined in the USB specification are a keyboard and a mouse.
//| A USB host can ask a USB device to use a boot device if the USB device says it is available.
//| Usually only a limited-functionality host like a BIOS or other boot-time software
//| needs boot device support.
//|
//| For example, to make a boot keyboard available, you can use this code::
//|
//| usb_hid.enable((Device.KEYBOARD), boot_device=1) # 1 for a keyboard
//| usb_hid.enable((Device.KEYBOARD,), boot_device=1) # 1 for a keyboard, 2 for a mouse
//|
//| If the host requests the boot keyboard, the report descriptor provided by `Device.KEYBOARD`
//| will be ignored, and the predefined report descriptor will be used.
Expand Down
Loading