Date: Fri, 1 May 2009 21:48:24 GMT From: Sylvestre Gallon <syl@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 161456 for review Message-ID: <200905012148.n41LmOC2025463@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=161456 Change 161456 by syl@syl_atuin on 2009/05/01 21:47:40 Add synchronous and asynchronous functions into the manpage. Affected files ... .. //depot/projects/soc2009/syl_usb/src/lib/libusb/libusb10.3#2 edit Differences ... ==== //depot/projects/soc2009/syl_usb/src/lib/libusb/libusb10.3#2 (text+ko) ==== @@ -287,7 +287,7 @@ Get a USB configuration descriptor with a specific bConfigurationValue. This is a non-blocking function which does not send request through the device. Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the configuration does not exist and another -LIBUSB_ERROR code on failure +LIBUSB_ERROR code on failure. . .Pp .Ft void @@ -301,6 +301,64 @@ and a LIBUSB_ERROR code on failure. . .Pp +. +.Sh USB ASYNCHRONOUS I/O +. +.Pp +.Ft struct libusb_transfer * +.Fn libusb_alloc_transfer "int iso_packets" +Allocate a transfer with +.Fa iso_packets +numbers of isochronous packet descriptors. Returns NULL on error. +. +.Pp +.Ft void +.Fn libusb_free_transfer "struct libusb_transfer *tr" +Free a transfer. +. +.Pp +.Ft int +.Fn libusb_submit_transfer "struct libusb_transfer *tr" +This function will submit a transfer and returns immediately. Returns 0 on +success, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and +LIBUSB_ERROR code on other failure. +. +.Pp +.Ft int +.Fn libusb_cancel_transfer "struct libusb_transfer *tr" +This function asynchronously cancel a transfer. Returns 0 on success and +LIBUSB_ERROR code on failure. +. +.Pp +.Sh USB SYNCHRONOUS I/O +. +.Pp +.Ft int +.Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" +Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT +if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not +supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and +LIBUSB_ERROR code on other failure. +. +.Pp +.Ft int +.Fn libusb_bulk_transfer "struct libusb_device_handle *devh" "unsigned char endpoint" "unsigned char *data" "int length" "int *transferred" "unsigned int timeout" +Perform an USB bulk transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT +if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not +supported, LIBUSB_ERROR_OVERFLOW if the device offered more data, +LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and +LIBUSB_ERROR code on other failure. +. +.Pp +.Ft int +.Fn libusb_interrupt_transfer "struct libusb_device_handle *devh" "unsigned char endpoint" "unsigned char *data" "int length" "int *transferred" "unsigned int timeout" +Perform an USB Interrupt transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT +if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not +supported, LIBUSB_ERROR_OVERFLOW if the device offered more data, +LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and +LIBUSB_ERROR code on other failure. +. +.Pp .Sh SEE ALSO .Xr libusb 3 , .Xr usb2_core 4 ,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905012148.n41LmOC2025463>