mirror of
https://github.com/apache/nuttx.git
synced 2026-08-10 06:55:13 +00:00
A host that enumerates a device says nothing about it unless the whole of CONFIG_DEBUG_USB_INFO is on, and then it says a great deal else besides. The quietest case is the one that matters most: a device no class driver claims produces no output at all, so a user with an unsupported device sees exactly what a user with no device sees. Add CONFIG_USBHOST_ANNOUNCE, reporting each device once, in the shape a reader is likely to recognise from other systems: where it is, what it is, its vendor, product and release, and the maker, product and serial number it reports in its own string descriptors. Those cost a control transfer each, so they are read only where a report was asked for, and only once the device is addressed. The report is made after binding rather than from within it, because a composite device never reaches the class lookup: usbhost_composite() is tried first and binds it. Whether a driver claimed the device is tracked rather than read from the returned status, which the per interface loop sets to OK whatever happened. The port is given as the path from the root hub, and the path names the bus, because a device on the first port of a hub and one on the first port of a controller are otherwise reported identically. struct usbhost_roothubport_s gains that bus number for the purpose; a driver that does not set it reports zero, which is the only bus it has. Class codes are translated where a name is more use than a number, which includes the HID boot protocols, so a keyboard is reported as a keyboard. Default n, so no existing configuration changes. Assisted-by: Claude:claude-opus-5 Signed-off-by: Justin Hammond <justin@dynam.ac> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| hid_parser.c | ||
| Kconfig | ||
| Make.defs | ||
| usbhost_bthci.c | ||
| usbhost_cdcacm.c | ||
| usbhost_cdcecm.c | ||
| usbhost_cdcmbim.c | ||
| usbhost_composite.c | ||
| usbhost_composite.h | ||
| usbhost_devaddr.c | ||
| usbhost_drivers.c | ||
| usbhost_enumerate.c | ||
| usbhost_findclass.c | ||
| usbhost_ft232r.c | ||
| usbhost_hidkbd.c | ||
| usbhost_hidmouse.c | ||
| usbhost_hub.c | ||
| usbhost_max3421e.c | ||
| usbhost_registerclass.c | ||
| usbhost_registry.c | ||
| usbhost_registry.h | ||
| usbhost_skeleton.c | ||
| usbhost_storage.c | ||
| usbhost_trace.c | ||
| usbhost_waiter.c | ||
| usbhost_xboxcontroller.c | ||
| usbhost_xhci.h | ||
| usbhost_xhci_pci.c | ||
| usbhost_xhci_trace.c | ||
| usbhost_xhci_trace.h | ||