Control a feature for a USB device
#include <sys/usbdi.h>
int usbd_feature( struct usbd_device *device,
int set,
uint16_t feature,
uint16_t rtype,
uint16_t index );
- device
- An opaque handle used to identify the USB device.
- set
- Set or clear a feature on the USB device.
- feature
- A specific feature on the device.
- rtype
- Type of request (e.g.
USB_RECIPIENT_DEVICE,
USB_RECIPIENT_INTERFACE,
USB_RECIPIENT_ENDPOINT,
USB_RECIPIENT_OTHER,
USB_TYPE_STANDARD,
USB_TYPE_CLASS,
USB_TYPE_VENDOR).
- index
- This varies, depending on the request. It's used for passing a parameter to the device.
libusbdi
The usbd_feature() function lets you control a specific feature on a USB device.
- EOK
- Success.
- ENOMEM
- No memory for URB.
- ENODEV
- Device was removed.
- EIO
- I/O error on USB device.
QNX Neutrino, QNX 4
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
usbd_descriptor(),
usbd_io(),
usbd_setup_bulk(),
usbd_setup_control(),
usbd_setup_interrupt(),
usbd_setup_isochronous(),
usbd_setup_vendor(),
usbd_status()