Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Examples

usb_io.h

00001 #ifndef __NJB__USB__IO__H
00002 #define __NJB__USB__IO__H
00003 
00004 #include "libnjb.h"
00005 
00006 #define USBTIMEOUT 50000
00007 
00008 #include <usb.h>
00009 
00010 /*
00011  * Legacy #defines that map native *BSD USB #defines to those used by
00012  * libusb.  Some day we'll get rid of these.
00013  */
00014 
00015 #ifndef UT_WRITE
00016 #define UT_WRITE        USB_ENDPOINT_OUT
00017 #endif
00018 
00019 #ifndef UT_READ
00020 #define UT_READ         USB_ENDPOINT_IN
00021 #endif
00022 
00023 #ifndef UT_CLASS
00024 #define UT_CLASS        USB_TYPE_CLASS
00025 #endif
00026 
00027 #ifndef UT_STANDARD
00028 #define UT_STANDARD     USB_TYPE_STANDARD
00029 #endif
00030 
00031 #ifndef UT_WRITE_VENDOR_OTHER
00032 #define UT_WRITE_VENDOR_OTHER (UT_WRITE | USB_TYPE_VENDOR | USB_RECIP_OTHER )
00033 #endif
00034 
00035 #ifndef UT_READ_VENDOR_OTHER
00036 #define UT_READ_VENDOR_OTHER (UT_READ | USB_TYPE_VENDOR | USB_RECIP_OTHER )
00037 #endif
00038 
00039 ssize_t usb_pipe_read (njb_t *njb, void *buf, size_t nbytes);
00040 ssize_t usb_pipe_write (njb_t *njb, void *buf, size_t nbytes);
00041 int usb_setup (njb_t *njb, int type, int request, int value,
00042         int index, int length, void *data);
00043 
00044 #endif

Generated on Thu Oct 20 20:35:58 2005 for libnjb by  doxygen 1.4.4