Classes | Typedefs | Functions
usbhost.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <linux/version.h>
#include <linux/usb_ch9.h>
Include dependency graph for usbhost.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  usb_descriptor_iter
 
struct  usb_request
 

Typedefs

typedef int(* usb_device_added_cb) (const char *dev_name, void *client_data)
 
typedef int(* usb_device_removed_cb) (const char *dev_name, void *client_data)
 
typedef int(* usb_discovery_done_cb) (void *client_data)
 

Functions

void usb_descriptor_iter_init (struct usb_device *device, struct usb_descriptor_iter *iter)
 
struct usb_descriptor_header * usb_descriptor_iter_next (struct usb_descriptor_iter *iter)
 
int usb_device_bulk_transfer (struct usb_device *device, int endpoint, void *buffer, unsigned int length, unsigned int timeout)
 
int usb_device_claim_interface (struct usb_device *device, unsigned int interface)
 
void usb_device_close (struct usb_device *device)
 
int usb_device_connect_kernel_driver (struct usb_device *device, unsigned int interface, int connect)
 
int usb_device_control_transfer (struct usb_device *device, int requestType, int request, int value, int index, void *buffer, int length, unsigned int timeout)
 
size_t usb_device_get_descriptors_length (const struct usb_device *device)
 
const struct usb_device_descriptor * usb_device_get_device_descriptor (struct usb_device *device)
 
int usb_device_get_fd (struct usb_device *device)
 
char * usb_device_get_manufacturer_name (struct usb_device *device, int timeout)
 
const char * usb_device_get_name (struct usb_device *device)
 
char * usb_device_get_name_from_unique_id (int id)
 
uint16_t usb_device_get_product_id (struct usb_device *device)
 
char * usb_device_get_product_name (struct usb_device *device, int timeout)
 
const unsigned char * usb_device_get_raw_descriptors (const struct usb_device *device)
 
char * usb_device_get_serial (struct usb_device *device, int timeout)
 
char * usb_device_get_string (struct usb_device *device, int id, int timeout)
 
int usb_device_get_string_ucs2 (struct usb_device *device, int id, int timeout, void **ucs2_out, size_t *response_size)
 
int usb_device_get_unique_id (struct usb_device *device)
 
int usb_device_get_unique_id_from_name (const char *name)
 
uint16_t usb_device_get_vendor_id (struct usb_device *device)
 
int usb_device_get_version (struct usb_device *device)
 
int usb_device_is_writeable (struct usb_device *device)
 
struct usb_deviceusb_device_new (const char *dev_name, int fd)
 
struct usb_deviceusb_device_open (const char *dev_name)
 
int usb_device_release_interface (struct usb_device *device, unsigned int interface)
 
int usb_device_reset (struct usb_device *device)
 
int usb_device_set_configuration (struct usb_device *device, int configuration)
 
int usb_device_set_interface (struct usb_device *device, unsigned int interface, unsigned int alt_setting)
 
void usb_host_cleanup (struct usb_host_context *context)
 
int usb_host_get_fd (struct usb_host_context *context)
 
struct usb_host_contextusb_host_init (void)
 
int usb_host_load (struct usb_host_context *context, usb_device_added_cb added_cb, usb_device_removed_cb removed_cb, usb_discovery_done_cb discovery_done_cb, void *client_data)
 
int usb_host_read_event (struct usb_host_context *context)
 
void usb_host_run (struct usb_host_context *context, usb_device_added_cb added_cb, usb_device_removed_cb removed_cb, usb_discovery_done_cb discovery_done_cb, void *client_data)
 
int usb_request_cancel (struct usb_request *req)
 
void usb_request_free (struct usb_request *req)
 
struct usb_requestusb_request_new (struct usb_device *dev, const struct usb_endpoint_descriptor *ep_desc)
 
int usb_request_queue (struct usb_request *req)
 
struct usb_requestusb_request_wait (struct usb_device *dev, int timeoutMillis)
 

Typedef Documentation

typedef int(* usb_device_added_cb) (const char *dev_name, void *client_data)

Definition at line 58 of file usbhost.h.

typedef int(* usb_device_removed_cb) (const char *dev_name, void *client_data)

Definition at line 63 of file usbhost.h.

typedef int(* usb_discovery_done_cb) (void *client_data)

Definition at line 68 of file usbhost.h.

Function Documentation

void usb_descriptor_iter_init ( struct usb_device device,
struct usb_descriptor_iter iter 
)

Definition at line 587 of file usbhost.c.

struct usb_descriptor_header* usb_descriptor_iter_next ( struct usb_descriptor_iter iter)

Definition at line 594 of file usbhost.c.

int usb_device_bulk_transfer ( struct usb_device device,
int  endpoint,
void buffer,
unsigned int  length,
unsigned int  timeout 
)

Definition at line 666 of file usbhost.c.

int usb_device_claim_interface ( struct usb_device device,
unsigned int  interface 
)

Definition at line 604 of file usbhost.c.

void usb_device_close ( struct usb_device device)

Definition at line 364 of file usbhost.c.

int usb_device_connect_kernel_driver ( struct usb_device device,
unsigned int  interface,
int  connect 
)

Definition at line 614 of file usbhost.c.

int usb_device_control_transfer ( struct usb_device device,
int  requestType,
int  request,
int  value,
int  index,
void buffer,
int  length,
unsigned int  timeout 
)

Definition at line 640 of file usbhost.c.

size_t usb_device_get_descriptors_length ( const struct usb_device device)

Definition at line 466 of file usbhost.c.

const struct usb_device_descriptor* usb_device_get_device_descriptor ( struct usb_device device)

Definition at line 462 of file usbhost.c.

int usb_device_get_fd ( struct usb_device device)

Definition at line 415 of file usbhost.c.

char* usb_device_get_manufacturer_name ( struct usb_device device,
int  timeout 
)

Definition at line 558 of file usbhost.c.

const char* usb_device_get_name ( struct usb_device device)

Definition at line 422 of file usbhost.c.

char* usb_device_get_name_from_unique_id ( int  id)

Definition at line 441 of file usbhost.c.

uint16_t usb_device_get_product_id ( struct usb_device device)

Definition at line 456 of file usbhost.c.

char* usb_device_get_product_name ( struct usb_device device,
int  timeout 
)

Definition at line 564 of file usbhost.c.

const unsigned char* usb_device_get_raw_descriptors ( const struct usb_device device)

Definition at line 470 of file usbhost.c.

char* usb_device_get_serial ( struct usb_device device,
int  timeout 
)

Definition at line 576 of file usbhost.c.

char* usb_device_get_string ( struct usb_device device,
int  id,
int  timeout 
)

Definition at line 537 of file usbhost.c.

int usb_device_get_string_ucs2 ( struct usb_device device,
int  id,
int  timeout,
void **  ucs2_out,
size_t response_size 
)

Definition at line 488 of file usbhost.c.

int usb_device_get_unique_id ( struct usb_device device)

Definition at line 427 of file usbhost.c.

int usb_device_get_unique_id_from_name ( const char *  name)

Definition at line 434 of file usbhost.c.

uint16_t usb_device_get_vendor_id ( struct usb_device device)

Definition at line 450 of file usbhost.c.

int usb_device_get_version ( struct usb_device device)

Definition at line 570 of file usbhost.c.

int usb_device_is_writeable ( struct usb_device device)

Definition at line 582 of file usbhost.c.

struct usb_device* usb_device_new ( const char *  dev_name,
int  fd 
)

Definition at line 370 of file usbhost.c.

struct usb_device* usb_device_open ( const char *  dev_name)

Definition at line 323 of file usbhost.c.

int usb_device_release_interface ( struct usb_device device,
unsigned int  interface 
)

Definition at line 609 of file usbhost.c.

int usb_device_reset ( struct usb_device device)

Reset USB bus for the device

Definition at line 682 of file usbhost.c.

int usb_device_set_configuration ( struct usb_device device,
int  configuration 
)

Definition at line 625 of file usbhost.c.

int usb_device_set_interface ( struct usb_device device,
unsigned int  interface,
unsigned int  alt_setting 
)

Definition at line 630 of file usbhost.c.

void usb_host_cleanup ( struct usb_host_context context)

Definition at line 179 of file usbhost.c.

int usb_host_get_fd ( struct usb_host_context context)

Definition at line 185 of file usbhost.c.

struct usb_host_context* usb_host_init ( void  )

Definition at line 163 of file usbhost.c.

int usb_host_load ( struct usb_host_context context,
usb_device_added_cb  added_cb,
usb_device_removed_cb  removed_cb,
usb_discovery_done_cb  discovery_done_cb,
void client_data 
)

Definition at line 190 of file usbhost.c.

int usb_host_read_event ( struct usb_host_context context)

Definition at line 229 of file usbhost.c.

void usb_host_run ( struct usb_host_context context,
usb_device_added_cb  added_cb,
usb_device_removed_cb  removed_cb,
usb_discovery_done_cb  discovery_done_cb,
void client_data 
)

Definition at line 307 of file usbhost.c.

int usb_request_cancel ( struct usb_request req)

Definition at line 776 of file usbhost.c.

void usb_request_free ( struct usb_request req)

Definition at line 720 of file usbhost.c.

struct usb_request* usb_request_new ( struct usb_device dev,
const struct usb_endpoint_descriptor *  ep_desc 
)

Definition at line 687 of file usbhost.c.

int usb_request_queue ( struct usb_request req)

Definition at line 726 of file usbhost.c.

struct usb_request* usb_request_wait ( struct usb_device dev,
int  timeoutMillis 
)

Definition at line 742 of file usbhost.c.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:30