Classes | Macros | Typedefs
USB3.h File Reference

Interface for the USB module. More...

Classes

struct  usb_configuration_info
 Container for a specific configuration descriptor of a device. More...
 
struct  usb_endpoint_info
 Container for endpoint descriptors and their Haiku USB stack identifiers. More...
 
struct  usb_interface_info
 Container for interface descriptors and their Haiku USB stack identifiers. More...
 
struct  usb_interface_list
 List of interfaces available to a configuration. More...
 
struct  usb_iso_packet_descriptor
 The descriptor for data packets of isochronous transfers. More...
 
struct  usb_module_info
 Interface for drivers to interact with Haiku's USB stack. More...
 
struct  usb_notify_hooks
 Hooks that the USB stack can callback in case of events. More...
 
struct  usb_support_descriptor
 Description of device descriptor that the driver can handle. More...
 

Macros

#define B_USB_MODULE_NAME   "bus_managers/usb/v3"
 The identifier string for the USB Stack interface module.
 

Typedefs

typedef void(* usb_callback_func) (void *cookie, status_t status, void *data, size_t actualLength)
 Callback function for asynchronous transfers. More...
 
typedef struct usb_configuration_info usb_configuration_info
 Container for USB configuration descriptors. More...
 
typedef usb_id usb_device
 Uniquely identify USB devices.
 
typedef struct usb_endpoint_info usb_endpoint_info
 Container for USB endpoint descriptors. More...
 
typedef uint32 usb_id
 Uniquely identify various USB objects that are used in the module.
 
typedef usb_id usb_interface
 Uniquely identify USB interfaces.
 
typedef struct usb_interface_info usb_interface_info
 Container for USB interface descriptors. More...
 
typedef struct usb_interface_list usb_interface_list
 Container that holds a list of USB interface descriptors. More...
 
typedef struct usb_module_info usb_module_info
 The main interface object. See the usb_module_info documentation.
 
typedef usb_id usb_pipe
 Uniquely identify USB pipes.
 

Detailed Description

Interface for the USB module.

Typedef Documentation

◆ usb_callback_func

typedef void(* usb_callback_func)(void *cookie, status_t status, void *data, size_t actualLength)

Callback function for asynchronous transfers.

Parameters
cookieThe cookie you supplied when you queued the transfer.
statusThe status of the transfer. This is one of the following:
B_OKThe transfer succeeded.
B_CANCELEDThe transfer was cancelled by the user via a usb_module_info::cancel_queued_transfers() call.
B_DEV_MULTIPLE_ERRORSMore than one of the errors below occurred. Unfortunately, the stack cannot give you more information.
B_DEV_STALLEDThe endpoint is stalled. You can use usb_module_info::clear_feature() method with the associated pipe and the USB_FEATURE_ENDPOINT_HALT arguments.
B_DEV_DATA_OVERRUNIncoming transfer: more data flowing in than the size of the buffer.
B_DEV_DATA_UNDERRUNOutgoing transfer: more data is flowing out than the endpoint accepts.
B_DEV_CRC_ERRORThe internal data consistency checks of the USB protocol failed. It is best to retry. If you keep on getting this error there might be something wrong with the device.
B_DEV_UNEXPECTED_PIDThere was an internal error. You should retry your transfer.
B_DEV_FIFO_OVERRUNinternal error. You should retry your transfer.
B_DEV_FIFO_UNDERRUNThere was an internal error. You should retry your transfer.
dataThe provided buffer.
actualLengthThe amount of bytes read or written during the transfer.

◆ usb_configuration_info

Container for USB configuration descriptors.

See also
Documentation for usb_configuration_info.

◆ usb_endpoint_info

Container for USB endpoint descriptors.

See also
Documentation for usb_endpoint_info.

◆ usb_interface_info

Container for USB interface descriptors.

See also
Documentation for usb_interface_info.

◆ usb_interface_list

Container that holds a list of USB interface descriptors.

See also
Documentation for usb_interface_list.