avrtarget.c File Reference


Detailed Description

External AVR device programming.

 *
 * $Log: avrtarget.c,v $
 * Revision 1.1  2007/04/12 09:01:38  haraldkipp
 * New API allows to program external AVR devices.
 *
 *
 * 

Definition in file avrtarget.c.

Go to the source code of this file.

Defines

#define AVRTARGET_CHIPERASE_TIMEOUT   200
 Maximum time (in milliseconds) to wait for chip erase done.
#define AVRTARGET_PAGEWRITE_TIMEOUT   10
 Maximum time (in milliseconds) to wait for page write done.
#define AVR_FUSES_NEVER_PROG   0x00F88062UL
 Safe fuse programming mask.
#define AVR_FUSES_ALWAYS_PROG   0x0000201DUL
 Safe fuse unprogramming mask.
#define AVRTARGET_SPI_MODE   0
#define AVRTARGET_SPI_RATE   500000
#define AVRTARGET_NO_SPI_DEVICE

Functions

int AvrTargetInit (void)
 Initialize programming interface.
void AvrTargetSelect (ureg_t act)
 Set or clear the chip select line.
void AvrTargetReset (ureg_t act)
 Set or release the target's reset line.
u_long AvrTargetCmd (u_long cmd)
 Send programming command and return response.
int AvrTargetProgEnable (void)
 Enable target's programming mode.
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 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.


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/