Submitted by Doug Springer, based on work by

Wolfgang Moser, Ville Voipio, Hannes Weisbach
patch #7486: Patch to add FT2232C/D, FT2232H, FT4232H,
usbvid, usbpid, usbdev for USB support - Based on #7062
* avrftdi.c: New file.
* avrftdi.h: (Ditto.)
* configure.ac: Add check for libftdi.
* config_gram.y: Add AVRFTDI and per-programmer USB string
keywords.
* lexer.l: (Ditto.)
* avrdude.conf.in: Add avrftdi and 2232HIO programmers.
* pgm.h: Add USB parameters.
* Makefile.am: Add avrftdi.c and avrftdi.h.
* AUTHORS: Mention the new authors.
* avrdude.1: Document the changes.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@979 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch
2011-08-25 16:12:30 +00:00
parent be5fe6bf70
commit 43bd052abf
13 changed files with 1332 additions and 7 deletions

56
avrftdi.h Normal file
View File

@@ -0,0 +1,56 @@
/*
* avrftdi - extension for avrdude, Wolfgang Moser, Ville Voipio
* Copyright (C) 2011 Hannes Weisbach, Doug Springer
*
* 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 avrftdi_h
#define avrfdti_h
#ifdef __cplusplus
extern "C" {
#endif
#define SCK 0x01
#define SDO 0x02
#define SDI 0x04
#define RX 0x20
#define TX 0x11
#define TRX (RX | TX)
#define TYPE_C_D 0x500
#define TYPE_H 0x700
#define TYPE_4H 0x800
#define E(x) if ((x)) { fprintf(stdout, "%s:%d %s() %s: %s (%d)\n\t%s\n", __FILE__, __LINE__, __FUNCTION__, \
#x, strerror(errno), errno, ftdi_get_error_string(&ftdic)); return -1; }
#define E_VOID(x) if ((x)) { fprintf(stdout, "%s:%d %s() %s: %s (%d)\n\t%s\n", __FILE__, __LINE__, __FUNCTION__, \
#x, strerror(errno), errno, ftdi_get_error_string(&ftdic)); }
void avrftdi_initpgm (PROGRAMMER * pgm);
#ifdef __cplusplus
}
#endif
#endif