|
USB EPROM/Flash Programmer
|
Device Operation Class. More...
#include <device.hpp>
Public Types | |
| typedef std::vector< uint8_t > | TByteArray |
| Type of byte array. More... | |
Public Member Functions | |
| Device () | |
| Constructor. More... | |
| void | init () |
| Starts the device. More... | |
| TDeviceSettings | getSettings () const |
| Get configured Device settings. More... | |
| void | vddCtrl (bool value=true) |
| VDD Control. More... | |
| void | vddSetV (float value) |
| VDD Set Voltage. More... | |
| float | vddGetV (void) |
| VDD Get Voltage. More... | |
| float | vddGetDuty (void) |
| VDD Get Duty Cycle. More... | |
| float | vddGetCal (void) |
| VDD Get Calibration Value. More... | |
| void | vddInitCal (void) |
| VDD Init Calibration. More... | |
| void | vddSaveCal (float value) |
| VDD Save Calibration. More... | |
| void | vddOnVpp (bool value=true) |
| VDD on VPP. More... | |
| void | vppCtrl (bool value=true) |
| VPP Control. More... | |
| void | vppSetV (float value) |
| VPP Set Voltage. More... | |
| float | vppGetV (void) |
| VPP Get Voltage. More... | |
| float | vppGetDuty (void) |
| VPP Get Duty Cycle. More... | |
| float | vppGetCal (void) |
| VPP Get Calibration Value. More... | |
| void | vppInitCal (void) |
| VPP Init Calibration. More... | |
| void | vppSaveCal (float value) |
| VPP Save Calibration. More... | |
| void | vppOnA9 (bool value=true) |
| VPP on A9. More... | |
| void | vppOnA18 (bool value=true) |
| VPP on A18. More... | |
| void | vppOnCE (bool value=true) |
| VPP on CE. More... | |
| void | vppOnWE (bool value=true) |
| VPP on WE. More... | |
| void | vppOnOE (bool value=true) |
| VPP on OE. More... | |
| void | setCE (bool value=true) |
| CE Control. More... | |
| void | setWE (bool value=true) |
| WE Control. More... | |
| void | setOE (bool value=true) |
| OE Control. More... | |
| bool | addrClr () |
| Address Clear. More... | |
| bool | addrInc () |
| Address Increment. More... | |
| bool | addrSet (uint32_t value) |
| Address Set DWord. More... | |
| bool | addrSetB (uint8_t value) |
| Address Set Byte. More... | |
| bool | addrSetW (uint16_t value) |
| Address Set Word. More... | |
| uint32_t | addrGet () const |
| Address Get (internal value). More... | |
| bool | dataClr () |
| Data Clear. More... | |
| bool | dataSet (uint8_t value) |
| Data Set Byte. More... | |
| bool | dataSetW (uint16_t value) |
| Data Set Word. More... | |
| uint8_t | dataGet () |
| Data Get Byte. More... | |
| uint16_t | dataGetW () |
| Data Get Word. More... | |
| void | setTwp (uint32_t value) |
| Device Set tWP. More... | |
| void | setTwc (uint32_t value) |
| Device Set tWC. More... | |
| void | configure (uint16_t value) |
| Device Configure. More... | |
| bool | setupBus (uint8_t operation) |
| Device Setup Bus. More... | |
| TByteArray | read (size_t count=64) |
| Device Read Byte/Word at current address. More... | |
| bool | write (const TByteArray &value, size_t count=64, bool verify=true) |
| Device Write Byte/Word at current address. More... | |
| bool | writeSector (const TByteArray §or, size_t count=16, bool verify=true) |
| Device Write Sector Byte/Word at current address. More... | |
| bool | verify (const TByteArray &value, size_t count=64) |
| Device Verify Byte/Word at current address. More... | |
| bool | blankCheck (size_t count=64) |
| Device Blank Check Byte/Word at current address. More... | |
| bool | getId (uint32_t &id) |
| Device Get ID. More... | |
| bool | erase () |
| Device Erase. More... | |
| bool | unprotect () |
| Device Unprotect. More... | |
| bool | protect () |
| Device Protect. More... | |
Device Operation Class.
The purpose of this class is to handle the operation with device.
| typedef std::vector<uint8_t> TByteArray |
Type of byte array.
| Device | ( | ) |
Constructor.
| void init | ( | ) |
Starts the device.
| Device::TDeviceSettings getSettings | ( | ) | const |
| void vddCtrl | ( | bool | value = true | ) |
VDD Control.
| value | If true (default), sets the pin. Resets otherwise. |
| void vddSetV | ( | float | value | ) |
VDD Set Voltage.
| value | Value to set. |
| float vddGetV | ( | void | ) |
VDD Get Voltage.
| float vddGetDuty | ( | void | ) |
VDD Get Duty Cycle.
| float vddGetCal | ( | void | ) |
VDD Get Calibration Value.
| void vddInitCal | ( | void | ) |
VDD Init Calibration.
| void vddSaveCal | ( | float | value | ) |
VDD Save Calibration.
| value | Value to save. |
| void vddOnVpp | ( | bool | value = true | ) |
VDD on VPP.
| value | If true (default), sets the pin. Resets otherwise. |
| void vppCtrl | ( | bool | value = true | ) |
VPP Control.
| value | If true (default), sets the pin. Resets otherwise. |
| void vppSetV | ( | float | value | ) |
VPP Set Voltage.
| value | Value to set. |
| float vppGetV | ( | void | ) |
VPP Get Voltage.
| float vppGetDuty | ( | void | ) |
VPP Get Duty Cycle.
| float vppGetCal | ( | void | ) |
VPP Get Calibration Value.
| void vppInitCal | ( | void | ) |
VPP Init Calibration.
| void vppSaveCal | ( | float | value | ) |
VPP Save Calibration.
| value | Value to save. |
| void vppOnA9 | ( | bool | value = true | ) |
VPP on A9.
| value | If true (default), sets the pin. Resets otherwise. |
| void vppOnA18 | ( | bool | value = true | ) |
VPP on A18.
| value | If true (default), sets the pin. Resets otherwise. |
| void vppOnCE | ( | bool | value = true | ) |
VPP on CE.
| value | If true (default), sets the pin. Resets otherwise. |
| void vppOnWE | ( | bool | value = true | ) |
VPP on WE.
| value | If true (default), sets the pin. Resets otherwise. |
| void vppOnOE | ( | bool | value = true | ) |
VPP on OE.
| value | If true (default), sets the pin. Resets otherwise. |
| void setCE | ( | bool | value = true | ) |
CE Control.
| value | If true (default), sets the pin. Resets otherwise. |
| void setWE | ( | bool | value = true | ) |
WE Control.
| value | If true (default), sets the pin. Resets otherwise. |
| void setOE | ( | bool | value = true | ) |
OE Control.
| value | If true (default), sets the pin. Resets otherwise. |
| bool addrClr | ( | ) |
Address Clear.
| bool addrInc | ( | ) |
Address Increment.
| bool addrSet | ( | uint32_t | value | ) |
Address Set DWord.
| value | Value to set. |
| bool addrSetB | ( | uint8_t | value | ) |
Address Set Byte.
| value | Value to set. |
| bool addrSetW | ( | uint16_t | value | ) |
Address Set Word.
| value | Value to set. |
| uint32_t addrGet | ( | ) | const |
Address Get (internal value).
| bool dataClr | ( | ) |
Data Clear.
| bool dataSet | ( | uint8_t | value | ) |
Data Set Byte.
| value | Value to set. |
| bool dataSetW | ( | uint16_t | value | ) |
Data Set Word.
| value | Value to set. |
| uint8_t dataGet | ( | ) |
Data Get Byte.
| uint16_t dataGetW | ( | ) |
Data Get Word.
| void setTwp | ( | uint32_t | value | ) |
Device Set tWP.
| value | Value to set. |
| void setTwc | ( | uint32_t | value | ) |
Device Set tWC.
| value | Value to set. |
| void configure | ( | uint16_t | value | ) |
Device Configure.
| value | Value to set. |
| bool setupBus | ( | uint8_t | operation | ) |
Device Setup Bus.
| operation | Operation to realize. |
| Device::TByteArray read | ( | size_t | count = 64 | ) |
Device Read Byte/Word at current address.
Read a buffer (count bytes/words) at current address, and increment the address.
| count | Number of bytes/words to read. Default is 64. |
| bool write | ( | const TByteArray & | value, |
| size_t | count = 64, |
||
| bool | verify = true |
||
| ) |
Device Write Byte/Word at current address.
Write a buffer (count bytes/words) at current address, and increment the address.
| value | Buffer to write (MSB first). |
| count | Number of bytes/words to write. Default is 64. |
| verify | If true (default), verify after write. |
| bool writeSector | ( | const TByteArray & | sector, |
| size_t | count = 16, |
||
| bool | verify = true |
||
| ) |
Device Write Sector Byte/Word at current address.
Write a sector (count bytes/words) at current address, and increment the address.
| sector | Sector to write (MSB first). |
| count | Sector size, in bytes/words. Default is 16. |
| verify | If true (default), verify after write. |
| bool verify | ( | const TByteArray & | value, |
| size_t | count = 64 |
||
| ) |
Device Verify Byte/Word at current address.
Verify a buffer (count bytes/words) at current address, and increment the address.
| value | Buffer to verify (MSB first). |
| count | Number of bytes/words to verify. Default is 64. |
| bool blankCheck | ( | size_t | count = 64 | ) |
Device Blank Check Byte/Word at current address.
Blank Check a buffer (count bytes/words) at current address, and increment the address.
| count | Number of bytes/words to check. Default is 64. |
| bool getId | ( | uint32_t & | id | ) |
| bool erase | ( | ) |
Device Erase.
| bool unprotect | ( | ) |
Device Unprotect.
| bool protect | ( | ) |
Device Protect.