Files | |
file | pci_dev_iface.h |
PCI device interface definition. | |
file | usb_iface.h |
USB interface definition. | |
file | usbhc_iface.h |
USB host controller interface definition. | |
Modules | |
Base USB library | |
Common definitions for any driver or application dealing with USB. | |
USB library for device drivers | |
Library for writing drivers of endpoint devices (functions). | |
USB library for host controller drivers | |
Library for writing host controller drivers. | |
USB library for HID devices | |
Library for writing USB HID drivers. | |
USB virtualization | |
Support for virtual USB devices. | |
USB info application | |
Application for querying USB devices. | |
HelenOS version of lsusb command | |
Application for listing USB host controllers. | |
USB multi interface device driver | |
USB multi interface device driver. | |
USB hub driver | |
USB hub driver. | |
USB HID driver | |
USB driver for HID devices. | |
USB mouse driver | |
USB driver for mouse with boot protocol. | |
USB mass storage driver | |
USB driver for mass storage devices (bulk-only protocol). | |
UHCI driver | |
Drivers for USB UHCI host controller and root hub. | |
OHCI driver | |
Driver for OHCI host controller. | |
EHCI driver | |
Driver for EHCI host controller. | |
USB fallback driver | |
Fallback driver for any USB device. | |
Data Structures | |
struct | pci_dev_iface_t |
PCI device communication interface. More... | |
struct | usb_iface_t |
USB device communication interface. More... | |
struct | usbhc_iface_t |
USB host controller communication interface. More... | |
Typedefs | |
typedef void(*) | usbhc_iface_transfer_in_callback_t (ddf_fun_t *, int, size_t, void *) |
Callback for incoming transfer. | |
typedef int(*) | usbhc_iface_transfer_in_t (ddf_fun_t *, usb_target_t, void *, size_t, usbhc_iface_transfer_in_callback_t, void *) |
In transfer processing function prototype. | |
typedef void(*) | usbhc_iface_transfer_out_callback_t (ddf_fun_t *, int, void *) |
Callback for outgoing transfer. | |
typedef int(*) | usbhc_iface_transfer_out_t (ddf_fun_t *, usb_target_t, void *, size_t, usbhc_iface_transfer_out_callback_t, void *) |
Out transfer processing function prototype. | |
typedef usbhc_iface_transfer_out_t | usbhc_iface_transfer_setup_t |
Setup transfer processing function prototype. | |
Enumerations | |
enum | pci_dev_iface_funcs_t |
enum | usb_iface_funcs_t { IPC_M_USB_GET_ADDRESS, IPC_M_USB_GET_INTERFACE, IPC_M_USB_GET_HOST_CONTROLLER_HANDLE } |
enum | usbhc_iface_funcs_t { IPC_M_USBHC_REQUEST_ADDRESS, IPC_M_USBHC_BIND_ADDRESS, IPC_M_USBHC_GET_HANDLE_BY_ADDRESS, IPC_M_USBHC_RELEASE_ADDRESS, IPC_M_USBHC_INTERRUPT_OUT, IPC_M_USBHC_INTERRUPT_IN, IPC_M_USBHC_BULK_OUT, IPC_M_USBHC_BULK_IN, IPC_M_USBHC_CONTROL_WRITE, IPC_M_USBHC_CONTROL_READ, IPC_M_USBHC_REGISTER_ENDPOINT, IPC_M_USBHC_UNREGISTER_ENDPOINT } |
IPC methods for communication with HC through DDF interface. More... |
enum usb_iface_funcs_t |
IPC_M_USB_GET_ADDRESS |
Tell USB address assigned to device.
Parameters:
The handle must be the one used for binding USB address with it (IPC_M_USBHC_BIND_ADDRESS), otherwise the host controller (that this request would eventually reach) would not be able to find it. The problem is that this handle is actually assigned to the function inside driver of the parent device (usually hub driver). To bypass this problem, the initial caller specify handle as zero and the first parent assigns the actual value. See usb_iface_get_address_hub_child_impl() implementation that could be assigned to device ops of a child device of in a hub driver. For example, the USB multi interface device driver (MID) passes this initial zero without any modification because the handle must be resolved by its parent. |
IPC_M_USB_GET_INTERFACE |
Tell interface number given device can use.
Parameters
|
IPC_M_USB_GET_HOST_CONTROLLER_HANDLE |
Tell devman handle of device host controller.
Parameters:
|
Definition at line 42 of file usb_iface.h.
enum usbhc_iface_funcs_t |
IPC methods for communication with HC through DDF interface.
Notes for async methods:
Methods for sending data to device (OUT transactions)
Methods for retrieving data from device (IN transactions)
Some special methods (NO-DATA transactions) do not send any data. These might behave as both OUT or IN transactions because communication parts where actual buffers are exchanged are omitted.
For all these methods, wrap functions exists. Important rule: functions for IN transactions have (as parameters) buffers where retrieved data will be stored. These buffers must be already allocated and shall not be touch until the transaction is completed (e.g. not before calling usb_wait_for() with appropriate handle). OUT transactions buffers can be freed immediately after call is dispatched (i.e. after return from wrapping function).
IPC_M_USBHC_REQUEST_ADDRESS |
Asks for address assignment by host controller.
Answer:
The address must be released by via IPC_M_USBHC_RELEASE_ADDRESS. |
IPC_M_USBHC_BIND_ADDRESS |
Bind USB address with devman handle.
Parameters:
|
IPC_M_USBHC_GET_HANDLE_BY_ADDRESS |
Get handle binded with given USB address.
Parameters
|
IPC_M_USBHC_RELEASE_ADDRESS |
Release address in use.
Arguments:
|
IPC_M_USBHC_INTERRUPT_OUT |
Send interrupt data to device.
See explanation at usb_iface_funcs_t (OUT transaction). |
IPC_M_USBHC_INTERRUPT_IN |
Get interrupt data from device.
See explanation at usb_iface_funcs_t (IN transaction). |
IPC_M_USBHC_BULK_OUT |
Send bulk data to device.
See explanation at usb_iface_funcs_t (OUT transaction). |
IPC_M_USBHC_BULK_IN |
Get bulk data from device.
See explanation at usb_iface_funcs_t (IN transaction). |
IPC_M_USBHC_CONTROL_WRITE |
Issue control WRITE transfer.
See explanation at usb_iface_funcs_t (OUT transaction) for call parameters. This call is immediately followed by two IPC data writes from the caller (setup packet and actual data). |
IPC_M_USBHC_CONTROL_READ |
Issue control READ transfer.
See explanation at usb_iface_funcs_t (IN transaction) for call parameters. This call is immediately followed by IPC data write from the caller (setup packet) and IPC data read (buffer that was read). |
IPC_M_USBHC_REGISTER_ENDPOINT |
Register endpoint attributes at host controller.
This is used to reserve portion of USB bandwidth. When speed is invalid, speed of the device is used. Parameters:
|
IPC_M_USBHC_UNREGISTER_ENDPOINT |
Revert endpoint registration.
Parameters:
|
Definition at line 85 of file usbhc_iface.h.