
usbd
_
connect() © 2007, QNX Software Systems GmbH & Co. KG.
Connect a client driver to the USB stack
Synopsis:
#include <sys/usbdi.h>
int usbd_connect( usbd_connect_parm_t *parm,
struct usbd_connection **connection );
Arguments:
parm Connection parameters describing how to connect to the USB stack
and how you intend to operate with it.
connection An opaque handle returned on a successful connection; it’s used to
pass into other routines to identify the connection.
Library:
libusbdi
Description:
You use the usbd
_
connect() function to connect to a USB device and to provide
insertion/removal callbacks (in the
usbd_connect_parm_t data structure).
Data structures
typedef struct usbd_connect_parm {
const char *path;
_uint16 vusb;
_uint16 vusbd;
_uint32 flags;
int argc;
char **argv;
_uint32 evtbufsz;
usbd_device_ident_t *ident;
usbd_funcs_t *funcs;
_uint16 connect_wait
} usbd_connect_parm_t;
path Name of the stack (NULL means /dev/io-usb/io-usb, the
default name).
vusb and vusbd Versions of the USB stack (
USB_VERSION) and DDK
(
USBD_VERSION).
flags Currently none defined. Pass 0.
argc and argv Command-line arguments to the device driver that can be made
available via usbd
_
args
_
lookup() at insertion/attach time.
evtbufsz Size of the event buffer used by the handler thread to buffer events
from the USB stack. For the default size, pass 0.
28 Chapter 4 • USB Library Reference September 10, 2007
Comentários a estes Manuais