#define CMD_READ_SIGNATURE_ISP 0x1B\r
#define CMD_READ_OSCCAL_ISP 0x1C\r
#define CMD_SPI_MULTI 0x1D\r
-\r
#define CMD_XPROG 0x50\r
#define CMD_XPROG_SETMODE 0x51\r
\r
- #define XPRG_CMD_ENTER_PROGMODE 0x01\r
- #define XPRG_CMD_LEAVE_PROGMODE 0x02\r
- #define XPRG_CMD_ERASE 0x03\r
- #define XPRG_CMD_WRITE_MEM 0x04\r
- #define XPRG_CMD_READ_MEM 0x05\r
- #define XPRG_CMD_CRC 0x06\r
- #define XPRG_CMD_SET_PARAM 0x07\r
-\r
- #define XPRG_MEM_TYPE_APPL 1\r
- #define XPRG_MEM_TYPE_BOOT 2\r
- #define XPRG_MEM_TYPE_EEPROM 3\r
- #define XPRG_MEM_TYPE_FUSE 4\r
- #define XPRG_MEM_TYPE_LOCKBITS 5\r
- #define XPRG_MEM_TYPE_USERSIG 6\r
- #define XPRG_MEM_TYPE_FACTORY_CALIBRATION 7\r
-\r
- #define XPRG_ERASE_CHIP 1\r
- #define XPRG_ERASE_APP 2\r
- #define XPRG_ERASE_BOOT 3\r
- #define XPRG_ERASE_EEPROM 4\r
- #define XPRG_ERASE_APP_PAGE 5\r
- #define XPRG_ERASE_BOOT_PAGE 6\r
- #define XPRG_ERASE_EEPROM_PAGE 7\r
- #define XPRG_ERASE_USERSIG 8\r
-\r
- #define XPRG_MEM_WRITE_ERASE 0\r
- #define XPRG_MEM_WRITE_WRITE 1\r
-\r
- #define XPRG_CRC_APP 1\r
- #define XPRG_CRC_BOOT 2\r
- #define XPRG_CRC_FLASH 3\r
-\r
- #define XPRG_ERR_OK 0\r
- #define XPRG_ERR_FAILED 1\r
- #define XPRG_ERR_COLLISION 2\r
- #define XPRG_ERR_TIMEOUT 3\r
-\r
- #define XPRG_PARAM_NVMBASE 0x01\r
- #define XPRG_PARAM_EEPPAGESIZE 0x02\r
-\r
#define STATUS_CMD_OK 0x00\r
#define STATUS_CMD_TOUT 0x80\r
#define STATUS_RDY_BSY_TOUT 0x81\r