Skip to content

Commit 4b8feb2

Browse files
committed
fix some reference to mice in the keyboard example
1 parent 822de12 commit 4b8feb2

File tree

1 file changed

+3
-4
lines changed
  • USB_Host_Examples/CircuitPython_Keyboard_USB_Host

1 file changed

+3
-4
lines changed

USB_Host_Examples/CircuitPython_Keyboard_USB_Host/code.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
import usb
77
import adafruit_usb_host_descriptors
88

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
1110
kbd_interface_index = None
1211
kbd_endpoint_address = None
1312
keyboard = None
1413

1514
# scan for connected USB devices
1615
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
1817
kbd_interface_index, kbd_endpoint_address = (
1918
adafruit_usb_host_descriptors.find_boot_keyboard_endpoint(device)
2019
)
@@ -161,7 +160,7 @@ def print_keyboard_report(report_data):
161160

162161
# if there is no data it will raise USBTimeoutError
163162
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
165164
continue
166165

167166
print_keyboard_report(buf)

0 commit comments

Comments
 (0)