#include <usb/dev/driver.h>
#include <usb/dev/request.h>
#include <usb/debug.h>
#include <usb/dev/dp.h>
#include <errno.h>
#include <str_error.h>
#include <assert.h>
Go to the source code of this file.
Functions | |
static size_t | count_other_pipes (usb_endpoint_description_t **endpoints) |
Count number of pipes the driver expects. | |
static int | destroy_current_pipes (usb_device_t *dev) |
Destroy existing pipes of a USB device. | |
static int | generic_add_device (ddf_dev_t *gen_dev) |
Callback when new device is supposed to be controlled by this driver. | |
static int | init_wire_and_ctrl_pipe (usb_device_t *dev, const char **errmsg) |
Initialize control pipe in a device. | |
static int | initialize_other_pipes (usb_endpoint_description_t **endpoints, usb_device_t *dev, int alternate_setting) |
Initialize endpoint pipes, excluding default control one. | |
int | usb_device_create (ddf_dev_t *ddf_dev, usb_endpoint_description_t **endpoints, usb_device_t **dev_ptr, const char **errstr_ptr) |
Create new instance of USB device. | |
int | usb_device_create_pipes (ddf_dev_t *dev, usb_device_connection_t *wire, usb_endpoint_description_t **endpoints, uint8_t *config_descr, size_t config_descr_size, int interface_no, int interface_setting, usb_endpoint_mapping_t **pipes_ptr, size_t *pipes_count_ptr) |
Create pipes for a device. | |
void | usb_device_destroy (usb_device_t *dev) |
Destroy instance of a USB device. | |
int | usb_device_destroy_pipes (ddf_dev_t *dev, usb_endpoint_mapping_t *pipes, size_t pipes_count) |
Destroy pipes previously created by usb_device_create_pipes. | |
int | usb_device_retrieve_descriptors (usb_pipe_t *ctrl_pipe, usb_device_descriptors_t *descriptors) |
Retrieve basic descriptors from the device. | |
int | usb_device_select_interface (usb_device_t *dev, uint8_t alternate_setting, usb_endpoint_description_t **endpoints) |
Change interface setting of a device. | |
int | usb_driver_main (usb_driver_t *drv) |
Main routine of USB device driver. | |
Variables | |
static usb_driver_t * | driver = NULL |
static driver_t | generic_driver |
static driver_ops_t | generic_driver_ops |
Definition in file devdrv.c.