Contributed by Thomas Fischl: add support for USBasp.

patch #4686: Add support for USBasp, a simple USB programmer
* usbasp.c: New file, implement the USBasp driver.
* usbasp.h: New file, interface declarations for USBasp.
* Makefile.am: Wire the new files into the build.
* avrdude.conf.in: Add the usbasp programmer entry.
* config_gram.y: Add the usbasp token.
* lexer.l: (Ditto.)
* avrdude.1: Document the USBasp programmer.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@656 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch
2006-09-10 20:41:00 +00:00
parent 8ebe96ee2b
commit 333be851b9
9 changed files with 459 additions and 2 deletions

49
usbasp.h Normal file
View File

@@ -0,0 +1,49 @@
/*
* avrdude - A Downloader/Uploader for AVR device programmers
* Copyright (C) 2006 Thomas Fischl
*
* 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.
*
* 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.
*
* 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
*/
/* $Id$ */
#ifndef usbasp_h
#define usbasp_h
#include "avrpart.h"
#define USBDEV_VENDOR 0x03eb /* ATMEL */
#define USBDEV_PRODUCT 0xc7B4 /* USBasp */
#define USBASP_FUNC_CONNECT 1
#define USBASP_FUNC_DISCONNECT 2
#define USBASP_FUNC_TRANSMIT 3
#define USBASP_FUNC_READFLASH 4
#define USBASP_FUNC_ENABLEPROG 5
#define USBASP_FUNC_WRITEFLASH 6
#define USBASP_FUNC_READEEPROM 7
#define USBASP_FUNC_WRITEEEPROM 8
#define USBASP_BLOCKFLAG_FIRST 1
#define USBASP_BLOCKFLAG_LAST 2
#define USBASP_READBLOCKSIZE 200
#define USBASP_WRITEBLOCKSIZE 200
void usbasp_initpgm (PROGRAMMER * pgm);
#endif /* usbasp_h */