usbp_iusb_driver.h

Go to the documentation of this file.
00001 
00036 #ifndef __USBP_IUSB_DRIVER_H__
00037 #define __USBP_IUSB_DRIVER_H__
00038 
00039 #include "usbp_common.h"
00040 
00041 typedef enum xfer_type {INTERRUPT, BULK, ISO} eXferType;
00042 
00046 class iUSB_Driver
00047 {
00048   
00049 private:
00050   
00051 protected:
00052   
00053 public:   
00054   
00056   virtual int deviceInfo(void) = 0;
00057   virtual int deviceInfo(int vid, int pid) = 0;
00058   virtual int deviceOpen(int vid, int pid) = 0;
00059   virtual int deviceStatus(void) = 0;
00060   virtual int deviceCheck(void)  = 0;  
00061   virtual int deviceClose(int vid, int pid) = 0;
00062   
00063   virtual int assignEpt(void) = 0;
00064   
00066   virtual int controlWrite(byte reqCode, 
00067                            unsigned short value,
00068                            unsigned short index,
00069                            byte *b, int len, int timeout) = 0;
00070   
00072   //virtual int controlRead(byte *b, int len, int timeout) = 0;
00073   
00075   virtual int bulkWrite(int ep, int size, byte *b) = 0;
00076   virtual int bulkRead(int ep, int size, byte *b)  = 0; 
00077   virtual int bulkWriteRead(int ep_out, int ep_in, int size, byte *b) = 0;
00078   
00080   
00082   
00088   
00089   
00090 };
00091 
00092 #endif

Generated on Mon Mar 5 20:44:19 2007 for usbp by  doxygen 1.5.1-p1