|
Files |
file | dump.c |
| Dumping and debugging functions.
|
file | explore.c |
| Exploration of available interfaces in the USB device.
|
file | main.c |
| Main routines of USB multi interface device driver.
|
file | usbmid.c |
| Helper functions.
|
file | usbmid.h |
| Common definitions.
|
Data Structures |
struct | usbmid_interface_t |
| Container for single interface in a MID device. More...
|
Defines |
#define | NAME "usbmid" |
Functions |
static void | create_interfaces (uint8_t *config_descriptor, size_t config_descriptor_size, link_t *list) |
| Create list of interfaces from configuration descriptor.
|
static void | dump_tree (usb_dp_parser_t *parser, usb_dp_parser_data_t *data) |
| Dump descriptor tree.
|
static void | dump_tree_descriptor (uint8_t *data, size_t depth) |
| Dump found descriptor.
|
static void | dump_tree_internal (usb_dp_parser_t *parser, usb_dp_parser_data_t *data, uint8_t *root, size_t depth) |
| Dump tree of descriptors.
|
static bool | interface_in_list (link_t *list, int interface_no) |
| Tell whether given interface is already in the list.
|
int | main (int argc, char *argv[]) |
| Main entry point.
|
static int | usb_iface_get_address_impl (ddf_fun_t *fun, devman_handle_t handle, usb_address_t *address) |
| Callback for DDF USB interface.
|
static int | usb_iface_get_interface_impl (ddf_fun_t *fun, devman_handle_t handle, int *iface_no) |
| Callback for DDF USB interface.
|
static int | usbmid_add_device (usb_device_t *dev) |
| Callback when new MID device is attached to the host.
|
void | usbmid_dump_descriptors (uint8_t *descriptors, size_t length) |
| Dump given descriptors.
|
bool | usbmid_explore_device (usb_device_t *dev) |
| Explore MID device.
|
int | usbmid_spawn_interface_child (usb_device_t *parent, usbmid_interface_t *iface, const usb_standard_device_descriptor_t *device_descriptor, const usb_standard_interface_descriptor_t *interface_descriptor) |
| Spawn new child device from one interface.
|
Variables |
static ddf_dev_ops_t | child_device_ops |
| Operations for children - interface functions.
|
static usb_iface_t | child_usb_iface |
| DDF interface of the child - interface function.
|
static ddf_dev_ops_t | mid_device_ops |
| Operations of the device itself.
|
static usb_driver_t | mid_driver |
| USB MID driver.
|
static usb_driver_ops_t | mid_driver_ops |
| USB MID driver ops.
|
This driver serves as a mini hub (or bus) driver for devices that have the class defined at interface level (those devices usually have several interfaces).
The term multi interface device driver (MID) was borrowed Solaris operating system.