
usbd connect() 2006, QNX Software Systems GmbH & Co. KG.
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.
ident Identifies the devices you’re interested in receiving
insertion/removal callbacks for (a filter); fields can
be set to
USBD CONNECT WILDCARD or to an
explicit value.
funcs The insertion/removal callbacks.
connect
wait A value (in seconds) or USBD CONNECT WAIT.
typedef struct usbd device ident {
uint32 vendor;
uint32 device;
uint32 dclass;
uint32 subclass;
uint32 protocol;
} usbd
device ident t;
You would typically make the usbd device ident structure be a
filter for devices you support from this specific class driver.
typedef struct usbd funcs {
uint32 nentries;
void (*insertion)(struct usbd
connection *, usbd device instance t *instance);
void (*removal)(struct usbd
connection *, usbd device instance t *instance);
void (*event)(struct usbd
connection *, usbd device instance t *instance,
uint16 type);
} usbd
funcs t;
The callback functions are contained here.
insertion Called when a device that matches defined filter is
detected.
removal Called when a device is removed.
36 Chapter 4 USB Library Reference November 2, 2006
Comentarios a estos manuales