Expand description
USB Hotplug Detection
Monitors xHCI port status change bits (PORTSC registers) to detect USB device attach and detach events. Events are queued in a ring buffer and can be consumed by a userland udev daemon.
Structs§
- UsbHotplug
Manager - USB Hotplug Manager
- UsbPort
Status - Per-port status tracking
Enums§
- UsbDevice
Speed - USB device connection speed
- UsbHotplug
Event - USB hotplug event
Functions§
- usb_
hotplug_ get_ event - Get the next pending hotplug event
- usb_
hotplug_ has_ events - Check if there are pending hotplug events
- usb_
hotplug_ init - Initialize USB hotplug detection
- usb_
hotplug_ num_ ports - Get the number of monitored ports
- usb_
hotplug_ poll - Poll for USB hotplug events
- usb_
hotplug_ port_ status - Get port status
- usb_
hotplug_ register_ callback - Register a callback for hotplug events
Type Aliases§
- Hotplug
Callback - Hotplug callback function type