* * $Log: avrtarget.h,v $ * Revision 1.1 2007/04/12 09:01:41 haraldkipp * New API allows to program external AVR devices. * * *
Definition in file avrtarget.h.
Go to the source code of this file.
Defines | |
#define | AVRTARGET_PAGESIZE 128 |
Target's page size. | |
#define | AVRSIGNATURE_MEGA8 0x001E9307UL |
#define | AVRSIGNATURE_MEGA168 0x001E9406UL |
#define | AVRSIGNATURE_MEGA103 0x001E9701UL |
#define | AVRSIGNATURE_MEGA128 0x001E9702UL |
#define | AVRSIGNATURE_MEGA1280 0x001E9703UL |
#define | AVRSIGNATURE_MEGA1281 0x001E9704UL |
#define | AVRSIGNATURE_90CAN128 0x001E9781UL |
#define | AVRSIGNATURE_MEGA2560 0x001E9801UL |
#define | AVRSIGNATURE_MEGA2561 0x001E9802UL |
#define | AVRCMD_PROG_ENABLE 0xAC530000UL |
#define | AVRCMD_CHIP_ERASE 0xAC800000UL |
#define | AVRCMD_READ_PROG_MEM_LO 0x20000000UL |
#define | AVRCMD_READ_PROG_MEM_HI 0x28000000UL |
#define | AVRCMD_LOAD_PROG_MEM_PAGE_LO 0x40000000UL |
#define | AVRCMD_LOAD_PROG_MEM_PAGE_HI 0x48000000UL |
#define | AVRCMD_WRITE_PROG_MEM_PAGE 0x4c000000UL |
#define | AVRCMD_READ_EEPROM_MEM 0xA0000000UL |
#define | AVRCMD_WRITE_EEPROM_MEM 0xC0000000UL |
#define | AVRCMD_LOAD_EEPROM_MEM_PAGE 0xC1000000UL |
#define | AVRCMD_WRITE_EEPROM_MEM_PAGE 0xC2000000UL |
#define | AVRCMD_READ_LOCK_BITS 0x58000000UL |
#define | AVRCMD_WRITE_LOCK_BITS 0xACE00000UL |
#define | AVRCMD_READ_SIGNATURE_BYTE 0x30000000UL |
#define | AVRCMD_WRITE_FUSE_BITS 0xACA00000UL |
#define | AVRCMD_WRITE_FUSE_HI_BITS 0xACA80000UL |
#define | AVRCMD_WRITE_FUSE_EXT_BITS 0xACA40000UL |
#define | AVRCMD_READ_FUSE_BITS 0x50000000UL |
#define | AVRCMD_READ_FUSE_HI_BITS 0x58080000UL |
#define | AVRCMD_READ_FUSE_EXT_BITS 0x50080000UL |
#define | AVRCMD_READ_CALIBRATION_BYTE 0x38000000UL |
#define | AVRCMD_POLL_READY 0xF0000000UL |
Functions | |
int | AvrTargetInit (void) |
Initialize programming interface. | |
void | AvrTargetSelect (ureg_t act) |
Set or clear the chip select line. | |
void | AvrTargetReset (ureg_t on) |
Set or release the target's reset line. | |
u_long | AvrTargetCmd (u_long cmd) |
Send programming command and return response. | |
u_long | AvrTargetSignature (void) |
Retrieve the target's signature. | |
u_long | AvrTargetFusesRead (void) |
Retrieve the target's fuses. | |
u_long | AvrTargetFusesWriteSafe (u_long fuses) |
Program the target's fuses in a safe way. | |
int | AvrTargetProgEnable (void) |
Enable target's programming mode. | |
int | AvrTargetPollReady (u_int tmo) |
Poll target for becoming ready. | |
int | AvrTargetChipErase (void) |
Erase the target chip. | |
void | AvrTargetPageLoad (u_long page, CONST u_char *data) |
Load target's program memory page buffer. | |
int | AvrTargetPageWrite (u_long page) |
Write page buffer contents to program memory. | |
int | AvrTargetPageVerify (u_long page, CONST u_char *data) |
Verify program memory page contents. |
#define AVRTARGET_PAGESIZE 128 |
Target's page size.
Hardcoded for now.
Definition at line 58 of file avrtarget.h.
Referenced by AvrTargetPageLoad(), and AvrTargetPageVerify().
#define AVRSIGNATURE_MEGA8 0x001E9307UL |
Definition at line 64 of file avrtarget.h.
#define AVRSIGNATURE_MEGA168 0x001E9406UL |
Definition at line 65 of file avrtarget.h.
#define AVRSIGNATURE_MEGA103 0x001E9701UL |
Definition at line 66 of file avrtarget.h.
#define AVRSIGNATURE_MEGA128 0x001E9702UL |
Definition at line 67 of file avrtarget.h.
#define AVRSIGNATURE_MEGA1280 0x001E9703UL |
Definition at line 68 of file avrtarget.h.
#define AVRSIGNATURE_MEGA1281 0x001E9704UL |
Definition at line 69 of file avrtarget.h.
#define AVRSIGNATURE_90CAN128 0x001E9781UL |
Definition at line 70 of file avrtarget.h.
#define AVRSIGNATURE_MEGA2560 0x001E9801UL |
Definition at line 71 of file avrtarget.h.
#define AVRSIGNATURE_MEGA2561 0x001E9802UL |
Definition at line 72 of file avrtarget.h.
#define AVRCMD_PROG_ENABLE 0xAC530000UL |
#define AVRCMD_CHIP_ERASE 0xAC800000UL |
#define AVRCMD_READ_PROG_MEM_LO 0x20000000UL |
#define AVRCMD_READ_PROG_MEM_HI 0x28000000UL |
#define AVRCMD_LOAD_PROG_MEM_PAGE_LO 0x40000000UL |
#define AVRCMD_LOAD_PROG_MEM_PAGE_HI 0x48000000UL |
#define AVRCMD_WRITE_PROG_MEM_PAGE 0x4c000000UL |
#define AVRCMD_READ_EEPROM_MEM 0xA0000000UL |
Definition at line 84 of file avrtarget.h.
#define AVRCMD_WRITE_EEPROM_MEM 0xC0000000UL |
Definition at line 85 of file avrtarget.h.
#define AVRCMD_LOAD_EEPROM_MEM_PAGE 0xC1000000UL |
Definition at line 86 of file avrtarget.h.
#define AVRCMD_WRITE_EEPROM_MEM_PAGE 0xC2000000UL |
Definition at line 87 of file avrtarget.h.
#define AVRCMD_READ_LOCK_BITS 0x58000000UL |
Definition at line 88 of file avrtarget.h.
#define AVRCMD_WRITE_LOCK_BITS 0xACE00000UL |
Definition at line 89 of file avrtarget.h.
#define AVRCMD_READ_SIGNATURE_BYTE 0x30000000UL |
#define AVRCMD_WRITE_FUSE_BITS 0xACA00000UL |
#define AVRCMD_WRITE_FUSE_HI_BITS 0xACA80000UL |
#define AVRCMD_WRITE_FUSE_EXT_BITS 0xACA40000UL |
#define AVRCMD_READ_FUSE_BITS 0x50000000UL |
#define AVRCMD_READ_FUSE_HI_BITS 0x58080000UL |
#define AVRCMD_READ_FUSE_EXT_BITS 0x50080000UL |
#define AVRCMD_READ_CALIBRATION_BYTE 0x38000000UL |
Definition at line 97 of file avrtarget.h.
#define AVRCMD_POLL_READY 0xF0000000UL |