usbp_fx2lp_8051.h

Go to the documentation of this file.
00001 
00028 #ifndef __USBP_FX2LP_8051_H__
00029 #define __USBP_FX2LP_8051_H__
00030 
00031 #include "usbp_iusb_driver.h"
00032 #include "usbp_iusb_device.h"
00033 
00034 
00038 class FX2LP_8051 : public iUSB_Device
00039 {
00040 
00041 private:
00042 
00043   int controlWriteFW(int addr, byte *b, int len, int timeout);
00044   int controlReadFW(int addr, byte *b, int len, int timeout);
00045 
00046 public:
00047   iUSB_Driver *UsbD;    
00048 
00049   FX2LP_8051(){;}
00050   FX2LP_8051(iUSB_Driver *ud){UsbD = ud;}
00051   virtual ~FX2LP_8051(){UsbD = NULL;}
00052 
00053   void setUSB(iUSB_Driver *ud){UsbD = ud;}
00054 
00061   int downloadFirmware(string file, int vid, int pid);
00062   
00066   int LED(int led, bool on_off);
00067   
00068   int i2c_write(byte addr, byte *b, byte len);
00069 
00070 };
00071 
00072 #endif

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