adding usb host featherwing example
Adding device info circuitpython example for usb host featherwing
This commit is contained in:
parent
676ee67803
commit
42af17d20a
1 changed files with 24 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
||||||
|
# SPDX-FileCopyrightText: 2024 Liz Clark for Adafruit Industries
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
"""USB Host FeatherWing Device Info CircuitPython Example"""
|
||||||
|
|
||||||
|
|
||||||
|
import time
|
||||||
|
import board
|
||||||
|
import max3421e
|
||||||
|
import usb
|
||||||
|
|
||||||
|
spi = board.SPI()
|
||||||
|
cs = board.D10
|
||||||
|
irq = board.D9
|
||||||
|
|
||||||
|
host_chip = max3421e.Max3421E(spi, chip_select=cs, irq=irq)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
print("Finding devices:")
|
||||||
|
for device in usb.core.find(find_all=True):
|
||||||
|
# pylint: disable=line-too-long
|
||||||
|
print(f"{device.idVendor:04x}:{device.idProduct:04x}: {device.manufacturer} {device.product}")
|
||||||
|
time.sleep(5)
|
||||||
Loading…
Reference in a new issue