File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
USB_Host_Examples/CircuitPython_Keyboard_USB_Host Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 6
6
import usb
7
7
import adafruit_usb_host_descriptors
8
8
9
- # lists for mouse interface indexes, endpoint addresses, and USB Device instances
10
- # each of these will end up with length 2 once we find both mice
9
+ #interface index, and endpoint addresses for USB Device instance
11
10
kbd_interface_index = None
12
11
kbd_endpoint_address = None
13
12
keyboard = None
14
13
15
14
# scan for connected USB devices
16
15
for device in usb .core .find (find_all = True ):
17
- # check for boot mouse endpoints on this device
16
+ # check for boot keyboard endpoints on this device
18
17
kbd_interface_index , kbd_endpoint_address = (
19
18
adafruit_usb_host_descriptors .find_boot_keyboard_endpoint (device )
20
19
)
@@ -161,7 +160,7 @@ def print_keyboard_report(report_data):
161
160
162
161
# if there is no data it will raise USBTimeoutError
163
162
except usb .core .USBTimeoutError :
164
- # Nothing to do if there is no data for this mouse
163
+ # Nothing to do if there is no data for this keyboard
165
164
continue
166
165
167
166
print_keyboard_report (buf )
You can’t perform that action at this time.
0 commit comments