Nut/OS  4.10.3
API Reference
avrtarget.c File Reference

External AVR device programming. More...

#include <sys/timer.h>
#include <dev/avrtarget.h>
Include dependency graph for 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.
uint32_t AvrTargetCmd (uint32_t cmd)
 Send programming command and return response.
int AvrTargetProgEnable (void)
 Enable target's programming mode.
uint32_t AvrTargetSignature (void)
 Retrieve the target's signature.
uint32_t AvrTargetFusesRead (void)
 Retrieve the target's fuses.
uint32_t AvrTargetFusesWriteSafe (uint32_t fuses)
 Program the target's fuses in a safe way.
int AvrTargetPollReady (unsigned int tmo)
 Poll target for becoming ready.
int AvrTargetChipErase (void)
 Erase the target chip.
void AvrTargetPageLoad (uint32_t page, CONST uint8_t *data)
 Load target's program memory page buffer.
int AvrTargetPageWrite (uint32_t page)
 Write page buffer contents to program memory.
int AvrTargetPageVerify (uint32_t page, CONST uint8_t *data)
 Verify program memory page contents.

Detailed Description

External AVR device programming.

Copyright (C) 2007 by egnite Software GmbH. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

For additional information see http://www.ethernut.de/

 *
 * $Log$
 * Revision 1.3  2009/01/17 11:26:46  haraldkipp
 * Getting rid of two remaining BSD types in favor of stdint.
 * Replaced 'u_int' by 'unsinged int' and 'uptr_t' by 'uintptr_t'.
 *
 * Revision 1.2  2008/08/11 06:59:41  haraldkipp
 * BSD types replaced by stdint types (feature request #1282721).
 *
 * Revision 1.1  2007/04/12 09:01:38  haraldkipp
 * New API allows to program external AVR devices.
 *
 *
 * 

Definition in file avrtarget.c.