Skip to content

Commit 42af17d

Browse files
committed
adding usb host featherwing example
Adding device info circuitpython example for usb host featherwing
1 parent 676ee67 commit 42af17d

File tree

1 file changed

+24
-0
lines changed
  • USB_Host_BFF_Examples/CircuitPython_DeviceInfo_FeatherWing

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-FileCopyrightText: 2024 Liz Clark for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
"""USB Host FeatherWing Device Info CircuitPython Example"""
6+
7+
8+
import time
9+
import board
10+
import max3421e
11+
import usb
12+
13+
spi = board.SPI()
14+
cs = board.D10
15+
irq = board.D9
16+
17+
host_chip = max3421e.Max3421E(spi, chip_select=cs, irq=irq)
18+
19+
while True:
20+
print("Finding devices:")
21+
for device in usb.core.find(find_all=True):
22+
# pylint: disable=line-too-long
23+
print(f"{device.idVendor:04x}:{device.idProduct:04x}: {device.manufacturer} {device.product}")
24+
time.sleep(5)

0 commit comments

Comments
 (0)