2001-01-19 02:46:50 +00:00
|
|
|
/*
|
2003-02-08 04:17:25 +00:00
|
|
|
* avrdude - A Downloader/Uploader for AVR device programmers
|
2003-02-06 19:08:33 +00:00
|
|
|
* Copyright (C) 2000, 2001, 2002, 2003 Brian S. Dean <bsd@bsdhome.com>
|
2001-01-19 02:46:50 +00:00
|
|
|
*
|
2003-02-06 19:08:33 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2001-01-19 02:46:50 +00:00
|
|
|
*
|
2003-02-06 19:08:33 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2001-01-19 02:46:50 +00:00
|
|
|
*
|
2003-02-06 19:08:33 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-01-19 02:46:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#ifndef __avr_h__
|
|
|
|
#define __avr_h__
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2002-11-30 14:09:12 +00:00
|
|
|
#include "avrpart.h"
|
|
|
|
#include "pgm.h"
|
2001-01-19 02:46:50 +00:00
|
|
|
|
2001-01-22 01:59:47 +00:00
|
|
|
|
2001-10-13 03:12:52 +00:00
|
|
|
|
2001-01-19 02:46:50 +00:00
|
|
|
extern struct avrpart parts[];
|
|
|
|
|
|
|
|
|
2003-11-30 16:42:10 +00:00
|
|
|
int avr_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
2002-11-30 14:09:12 +00:00
|
|
|
unsigned long addr, unsigned char * value);
|
2001-01-19 02:46:50 +00:00
|
|
|
|
2003-11-30 16:42:10 +00:00
|
|
|
int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
|
2002-11-30 14:09:12 +00:00
|
|
|
int verbose);
|
2001-01-19 02:46:50 +00:00
|
|
|
|
2002-11-30 14:09:12 +00:00
|
|
|
int avr_write_page(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
2001-11-21 02:46:55 +00:00
|
|
|
unsigned long addr);
|
2001-10-14 02:53:21 +00:00
|
|
|
|
2002-11-30 14:09:12 +00:00
|
|
|
int avr_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
2001-10-14 23:17:26 +00:00
|
|
|
unsigned long addr, unsigned char data);
|
2001-01-19 02:46:50 +00:00
|
|
|
|
2003-11-30 16:42:10 +00:00
|
|
|
int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
|
2002-11-30 14:09:12 +00:00
|
|
|
int verbose);
|
2001-01-19 02:46:50 +00:00
|
|
|
|
2002-11-30 14:09:12 +00:00
|
|
|
int avr_signature(PROGRAMMER * pgm, AVRPART * p);
|
2001-01-19 02:46:50 +00:00
|
|
|
|
2001-11-21 02:46:55 +00:00
|
|
|
int avr_verify(AVRPART * p, AVRPART * v, char * memtype, int size);
|
2001-01-19 02:46:50 +00:00
|
|
|
|
2002-11-30 14:09:12 +00:00
|
|
|
int avr_get_cycle_count(PROGRAMMER * pgm, AVRPART * p, int * cycles);
|
2002-08-01 01:00:03 +00:00
|
|
|
|
2002-11-30 14:09:12 +00:00
|
|
|
int avr_put_cycle_count(PROGRAMMER * pgm, AVRPART * p, int cycles);;
|
2002-08-01 01:00:03 +00:00
|
|
|
|
2003-05-22 02:33:17 +00:00
|
|
|
int avr_mem_hiaddr(AVRMEM * mem);
|
|
|
|
|
2004-01-03 18:04:54 +00:00
|
|
|
int avr_chip_erase(PROGRAMMER * pgm, AVRPART * p);
|
|
|
|
|
2003-07-29 22:08:21 +00:00
|
|
|
extern void report_progress (int completed, int total, char *hdr);
|
|
|
|
|
2001-01-19 02:46:50 +00:00
|
|
|
#endif
|