From owner-p4-projects@FreeBSD.ORG Fri May 1 21:48:24 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 90FCA1065674; Fri, 1 May 2009 21:48:24 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F113106566C for ; Fri, 1 May 2009 21:48:24 +0000 (UTC) (envelope-from syl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 341078FC1B for ; Fri, 1 May 2009 21:48:24 +0000 (UTC) (envelope-from syl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n41LmOs3025465 for ; Fri, 1 May 2009 21:48:24 GMT (envelope-from syl@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n41LmOC2025463 for perforce@freebsd.org; Fri, 1 May 2009 21:48:24 GMT (envelope-from syl@FreeBSD.org) Date: Fri, 1 May 2009 21:48:24 GMT Message-Id: <200905012148.n41LmOC2025463@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to syl@FreeBSD.org using -f From: Sylvestre Gallon To: Perforce Change Reviews Cc: Subject: PERFORCE change 161456 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2009 21:48:25 -0000 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 ,