#include <usbp_fx2lp_8051.h>
Inheritance diagram for FX2LP_8051:

Public Member Functions | |
| FX2LP_8051 () | |
| FX2LP_8051 (iUSB_Driver *ud) | |
| virtual | ~FX2LP_8051 () |
| void | setUSB (iUSB_Driver *ud) |
| int | downloadFirmware (string file, int vid, int pid) |
| Read in the configuration file and download it to the embedded microcontroller. | |
| int | LED (int led, bool on_off) |
| Change the LEDs connected to the FX2s IO ports. | |
| int | i2c_write (byte addr, byte *b, byte len) |
| I2C write. | |
Data Fields | |
| iUSB_Driver * | UsbD |
| Pointer to the USB interface. | |
Definition at line 38 of file usbp_fx2lp_8051.h.
| FX2LP_8051::FX2LP_8051 | ( | ) | [inline] |
Definition at line 49 of file usbp_fx2lp_8051.h.
| FX2LP_8051::FX2LP_8051 | ( | iUSB_Driver * | ud | ) | [inline] |
| virtual FX2LP_8051::~FX2LP_8051 | ( | ) | [inline, virtual] |
| void FX2LP_8051::setUSB | ( | iUSB_Driver * | ud | ) | [inline, virtual] |
| int FX2LP_8051::downloadFirmware | ( | string | file, | |
| int | vid, | |||
| int | pid | |||
| ) | [virtual] |
Read in the configuration file and download it to the embedded microcontroller.
The FX2 8051 code is written to memory via a set of vendor specific commands
<
If Fimrware has been loaded successfully, need to re-enumerate with the new VID/PID
Implements iUSB_Device.
Definition at line 71 of file usbp_fx2lp_8051.cpp.
References iUSB_Driver::deviceOpen(), CConfigFiles::ihxAddress, CConfigFiles::ihxClose(), CConfigFiles::ihxLen, CConfigFiles::ihxOpen(), CConfigFiles::ihxRead(), CConfigFiles::ihxType, CConfigFiles::MAX_IHX_RECORD_LEN, UPL_ERR, UPL_OK, and UsbD.
| int FX2LP_8051::LED | ( | int | led, | |
| bool | on_off | |||
| ) | [virtual] |
Change the LEDs connected to the FX2s IO ports.
Implements iUSB_Device.
Definition at line 46 of file usbp_fx2lp_8051.cpp.
References iUSB_Driver::controlWrite(), UPL_OK, and UsbD.
I2C write.
Implements iUSB_Device.
Definition at line 198 of file usbp_fx2lp_8051.cpp.
References iUSB_Driver::controlWrite(), UPL_OK, and UsbD.
Pointer to the USB interface.
Definition at line 47 of file usbp_fx2lp_8051.h.
Referenced by downloadFirmware(), FX2LP_8051(), i2c_write(), LED(), setUSB(), and ~FX2LP_8051().
1.5.1-p1