Lines Matching refs:device

64 /* Callback indicating that initial device discovery is done.
78 * added_cb will be called immediately for each existing USB device,
79 * and subsequently each time a new device is added.
90 /* Creates a usb_device object for a USB device */
93 /* Releases all resources associated with the USB device */
94 void usb_device_close(struct usb_device *device);
96 /* Creates a usb_device object for already open USB device */
100 int usb_device_get_fd(struct usb_device *device);
102 /* Returns the name for the USB device, which is the same as
105 const char* usb_device_get_name(struct usb_device *device);
107 /* Returns a unique ID for the device.
110 int usb_device_get_unique_id(struct usb_device *device);
112 /* Returns a unique ID for the device name.
113 * Currently this is generated from the device path.
117 /* Returns the device name for the unique ID.
121 /* Returns the USB vendor ID from the device descriptor for the USB device */
122 uint16_t usb_device_get_vendor_id(struct usb_device *device);
124 /* Returns the USB product ID from the device descriptor for the USB device */
125 uint16_t usb_device_get_product_id(struct usb_device *device);
127 const struct usb_device_descriptor* usb_device_get_device_descriptor(struct usb_device *device);
134 char* usb_device_get_string(struct usb_device *device, int id);
136 /* Returns the manufacturer name for the USB device.
139 char* usb_device_get_manufacturer_name(struct usb_device *device);
141 /* Returns the product name for the USB device.
144 char* usb_device_get_product_name(struct usb_device *device);
146 /* Returns the USB serial number for the USB device.
149 char* usb_device_get_serial(struct usb_device *device);
151 /* Returns true if we have write access to the USB device,
152 * and false if we only have access to the USB device configuration.
154 int usb_device_is_writeable(struct usb_device *device);
157 * the USB descriptors for a USB device.
159 void usb_descriptor_iter_init(struct usb_device *device, struct usb_descriptor_iter *iter);
161 /* Returns the next USB descriptor for a device, or NULL if we have reached the
166 /* Claims the specified interface of a USB device */
167 int usb_device_claim_interface(struct usb_device *device, unsigned int interface);
169 /* Releases the specified interface of a USB device */
170 int usb_device_release_interface(struct usb_device *device, unsigned int interface);
173 * This can be used to ask the kernel to disconnect its driver for a device
176 int usb_device_connect_kernel_driver(struct usb_device *device,
179 /* Sends a control message to the specified device on endpoint zero */
180 int usb_device_control_transfer(struct usb_device *device,
192 int usb_device_bulk_transfer(struct usb_device *device,
205 /* Submits a read or write request on the specified device */