Lines Matching +full:en +full:- +full:usb

9 ugen \- USB generic driver
13 \fBNode Name@unit-address\fR
18 \fB#include <sys/usb/clients/ugen/usb_ugen.h>\fR
23 \fBugen\fR is a generic USBA (Solaris USB Architecture) compliant client
24 character driver that presents USB devices to applications through a standard
27 are transferred to and from the device via file descriptors created for each USB
56 device is on-lined after hot insertion, and no driver is found, there will be
61 USB 2.0 device (usb<vid>,<pid>)...
67 where vid is the USB vendor identifier in hex and pid is the product
69 Note, the USB device version may vary depending on the device.
79 add_drv -n -m '* <device perms> <owner> <group>'
80 -i '"usb472,b0b0"' ugen
90 (ugen) already in use as a driver or alias.
100 update_drv -a -m '* <device perms> <owner> <group>'
101 -i '"usb472,b0b0"' ugen
111 driver_alias instead of usb<vid>,<pid>:
130 with the \fBprtconf\fR(8) -D option to determine if \fBugen\fR is successfully
131 bound to the device and the nodes created in /dev/usb/<vid>.<pid> (see below).
139 update_drv -a -m '* 0666 root sys'
140 -i '"usbif472,b0b0.config1.0"' ugen
147 any pre-existing ugen driver device-bindings will be reactivated. Likewise,
148 any pre-existing ugen driver device-bindings are preserved across operating
153 device name for device-wide status and one logical device name for endpoint 0.
160 device, the device-wide status and endpoint logical device names created for
166 \fBugen\fR makes the device-wide status available as \fBif0devstat\fR to the
188 /dev/usb/<vid>.<pid>/<N>/cntrl0
189 /dev/usb/<vid>.<pid>/<N>/cntrl0stat
193 /dev/usb/472.b0b0/0/cntrl0
194 /dev/usb/472.b0b0/0/cntrl0stat
198 /dev/usb/<vid>.<pid>/<N>/if<interface#>
200 /dev/usb/<vid>.<pid>/<N>/if<interface#>
205 /dev/usb/472.b0b0/0/if0in1
206 /dev/usb/472.b0b0/0/if0in1stat
210 /dev/usb/<vid>.<pid>/<N>/if<interface#>.
212 /dev/usb/<vid>.<pid>/<N>/if<interface#>.
217 /dev/usb/472.b0b0/0/if0.1in3
218 /dev/usb/472.b0b0/0/if0.1in3stat
221 /dev/usb/<vid>.<pid>/<N>/cfg<value>if<interface#>
223 /dev/usb/<vid>.<pid>/<N>/cfg<value>if<interface#>
228 /dev/usb/472.b0b0/0/cfg2if0in1
229 /dev/usb/472.b0b0/0/cfg2if0in1stat
236 /dev/usb/<vid>.<pid>/<N>/cfg<value>if<interface#>.
238 /dev/usb/<vid>.<pid>/<N>/cfg<value>if<interface#>.
243 /dev/usb/472.b0b0/0/cfg2if0.1in1
244 /dev/usb/472.b0b0/0/cfg2if0.1in1stat
248 /dev/usb/<vid>.<pid>/<N>/devstat
252 /dev/usb/472.b0b0/0/devstat
265 /dev/usb/<vid>.<pid>/<N>/if<interface#>cntrl0
266 /dev/usb/<vid>.<pid>/<N>/if<interface#>cntrl0stat
270 /dev/usb/472.b0b0/0/if0cntrl0
271 /dev/usb/472.b0b0/0/if0cntrl0stat
274 /dev/usb/<vid>.<pid>/<N>/if<interface#>devstat
277 /dev/usb/472.b0b0/0/if0devstat
289 alternate interface. A configuration change is prohibited when any non-zero
292 .SH HOT-PLUGGING
294 A device may be hot-removed at any time. Following hot-removal, the device
303 to a hot-removal. Upon successful suspend and resume, all subsequent transfer
373 if ((fd = open("/dev/usb/472.b0b0/0/devstat",
384 printf ("Terminating as device has been disconnected.\en");
428 ep1_data_fd = open ("/dev/usb/472.b0b0/0/if0out1", O_WRONLY);
434 ep1_stat_fd = open ("/dev/usb/472.b0b0/0/if0out1stat",
454 printf ("Endpoint stalled.\en");
484 fd = open("/dev/usb/472.b0b0/0/cntrl0", O_RDWR);
492 fdstat = open("/dev/usb/472.b0b0/0/cntrl0stat", O_RDONLY);
503 To perform a control-IN transfer, perform a \fBwrite\fR(2) of USB setup data
504 (see section 9.3 of the \fIUSB 1.1\fR or \fI2.0\fR specifications) followed by
554 If the \fBread\fR/\fBwrite\fR fails and returns \fB-1\fR, you can access the
582 To perform a control-OUT transfer, send in a single transfer, the USB setup
603 \fBwrite\fR(2) returns \fB-1\fR. Applications can read the corresponding
616 #include <sys/usb/usba.h>
617 #include <sys/usb/clients/ugen/usb_ugen.h>
631 /* See 9.13 of USB 2.0 spec for ordering. */
639 * class and vendor-specific descriptors, will be returned as part of
646 * Write setup data. USB device will prepare to return the whole
659 /* USB data is little endian. */
698 * non-char fields of all descriptors begin on aligned
700 * be adjacent to others which have an odd-numbered
701 * byte size, and may thus start on an odd-numbered
705 /* Remember to read any words in endian-neutral way. */
707 (void) printf("\enConfig %d found.\en",
713 (void) printf("\en\etInterface %d, Alt %d found.\en",
720 (void) printf("\en\et\etEndpoint %d (%s-%s) found.\en",
730 "\en\et\et\etOther descriptor found. Type:%d\en",
741 .SH INTERRUPT-IN TRANSFERS
743 Applications requiring data from an interrupt-IN endpoint should open the
748 An interrupt-IN endpoint must be opened with \fBO_RDONLY\fR. It can also be
753 fd = open("/dev/usb/472.b0b0/0/if0in1", O_RDONLY);
760 fdstat = open("/dev/usb/472.b0b0/0/if0in1stat", O_RDONLY);
781 buffer overflow, \fBugen\fR stops polling the interrupt-IN endpoint until the
783 buffer returns \fB-1\fR, sets the endpoint status to
793 if (count == -1) {
797 if (cnt == -1) {
822 Applications requiring unbuffered data from an interrupt-IN endpoint should
824 interrupt-IN endpoint and write a control byte with USB_EP_INTR_ONE_XFER set.
829 interrupt-IN endpoint has been closed by writing a control byte with
841 An application can open multiple interrupt-IN endpoints and can call
843 interrupt-IN data endpoints, not their status endpoints.)
850 pfd[0].fd = fd1; /* fd1 is one interrupt-IN endpoint. */
852 pfd[1].fd = fd2; /* fd2 is another interrupt-IN endpoint. */
856 poll(pfd, 2, -1);
873 the multiple interrupt-IN endpoints. Simply add another pollfd element to the
877 like the other elements. Note that only interrupt-IN endpoints and the device
879 .SH INTERRUPT-OUT TRANSFERS
881 Applications requiring output on an interrupt-OUT endpoint can open the
886 An interrupt-OUT endpoint must be opened with O_WRONLY.
890 fd = open("/dev/usb/472.b0b0/0/if0out3", O_WRONLY);
892 fdstat = open("/dev/usb/472.b0b0/0/if0out3stat", O_RDONLY);
900 Data can be written to an interrupt-OUT endpoint as follows:
905 if (count == -1) {
924 fd = open("/dev/usb/472.b0b0/0/if0in2", O_RDONLY);
931 fdstat = open("/dev/usb/472.b0b0/0/if0in2stat", O_RDONLY);
937 Data can be read from a bulk-IN endpoint as follows:
942 if (count == -1) {
946 Data can be written to a bulk-OUT endpoint as follows:
949 if (count == -1) {
964 fd = open("/dev/usb/472.b0b0/0/if0.3in2", O_RDWR);
966 fdstat = open("/dev/usb/472.b0b0/0/if0.3in2stat", O_RDONLY);
1018 \fBreq_isoc_pkts_count\fR is limited by the capability of the USB host
1023 For an isochronous-IN endpoint, applications must first use the
1028 \fBread\fR(2) of the data on the isochronous-IN endpoint. Upon successful
1036 full-speed isochronous endpoint, one second of data for high-speed isochronous
1038 incoming data for high-speed high-bandwidth isochronous endpoints who request
1043 The isochronous-IN polling can only be stopped by a \fBclose\fR(2) associated
1045 first \fBclose\fR(2) the endpoint to stop the isochronous-IN polling, then
1049 The following example shows how to read an isochronous-IN endpoint:
1053 #include <sys/usb/clients/ugen/usb_ugen.h>
1074 req->req_isoc_pkts_count = pktcnt;
1077 (req->req_isoc_pkt_descrs);
1117 " actual_len = %d, status = 0x%x\en",
1118 i, pktdesc->dsc_isoc_pkt_len,
1119 pktdesc->dsc_isoc_pkt_actual_len,
1120 pktdesc->dsc_isoc_pkt_status);
1128 p += pktdesc->dsc_isoc_pkt_len;
1137 For an isochronous-OUT endpoint, applications use the same packet descriptor
1146 In the following example, an application transfers data on an isochronous-OUT
1151 #include <sys/usb/clients/ugen/usb_ugen.h>
1178 req->req_isoc_pkts_count = pktcnt;
1181 (ugen_isoc_pkt_descr_t *)(req->req_isoc_pkt_descrs);
1421 Polling was stopped as the interrupt-IN data buffer was full. Buffer is now
1483 isochronous-IN endpoint is suspended and can be resumed on next \fBread\fR(2).
1541 Device has been hot-removed or a suspend/resume happened before this command.
1579 32-bit ELF kernel module. (x86).
1589 64-bit ELF kernel module. (x86).
1599 64-bit ELF kernel module. (SPARC).
1605 /dev/usb/<vid>.<pid>/<N>/cntrl0
1606 /dev/usb/<vid>.<pid>/<N>/cntrl0stat
1608 /dev/usb/<vid>.<pid>/<N>/if<interface#>
1610 /dev/usb/<vid>.<pid>/<N>/if<interface#>
1613 /dev/usb/<vid>.<pid>/<N>/if<interface#>.
1615 /dev/usb/<vid>.<pid>/<N>/if<interface#>.
1618 /dev/usb/<vid>.<pid>/<N>/cfg<value>if<interface#>
1620 /dev/usb/<vid>.<pid>/<N>/cfg<value>if<interface#>
1623 /dev/usb/<vid>.<pid>/<N>/cfg<value>if<interface#>.
1625 /dev/usb/<vid>.<pid>/<N>/cfg<value>if<interface#>.
1628 /dev/usb/<vid>.<pid>/<N>/devstat
1630 /dev/usb/<vid>.<pid>/<N>/if<interface#>cntrl0
1631 /dev/usb/<vid>.<pid>/<N>/if<interface#>cntrl0stat
1651 Architecture SPARC & x86, PCI-based systems
1722 \fBugen\fR returns \fB-1\fR for all commands and sets \fBerrno\fR to
1723 \fBENODEV\fR when device has been hot-removed or resumed from a suspend. The