USBD_OPEN_DEVICE_EXT
Purpose
Opens a specific USB logical device.
Syntax
int fp_ioctl (file, USBD_OPEN_DEVICE_EXT, arg, ext)
Parameter
Item | Description |
---|---|
file | File descriptor that is obtained when th USBD special file was opened. |
arg | Address of an initialized DEVOPEN structure (See the DEVOPEN structure in the /usr/include/sys/usbdi.h file). |
ext | Not used and must be set to zero. |
Description
The client driver uses this fp_ioctl to establish a connection to a USB logical device as identified by information within the DEVSELECTOR structure. The ioctl is similar to the USBD_OPEN_DEVICE ioctl except that a client handle is allocated even when a USB logical device that matches the criteria specified through the DEVSELECTOR structure is not available. The USBD returns EAGAIN to indicate this condition. When EAGAIN is returned, the client driver must treat the device as being disconnected and wait for a reconnection call-back before preceding with device initialization.
Execution Environment
This function can be called from the user process environment only.
Return Values
Value | Description |
---|---|
0 | Indicates successful completion. |
EINVAL | Invalid parameter. |
EAGAIN | Returned if specified device does not exist; client driver must treat device as open and disconnected |