fileio.h

00001 /*
00002  * avrdude - A Downloader/Uploader for AVR device programmers
00003  * Copyright (C) 2000-2004  Brian S. Dean <bsd@bsdhome.com>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 
00020 /* $Id: fileio.h,v 1.16 2007/01/24 22:43:46 joerg_wunsch Exp $ */
00021 
00022 #ifndef fileio_h
00023 #define fileio_h
00024 
00025 typedef enum {
00026   FMT_AUTO,
00027   FMT_SREC,
00028   FMT_IHEX,
00029   FMT_RBIN,
00030   FMT_IMM,
00031   FMT_HEX,
00032   FMT_DEC,
00033   FMT_OCT,
00034   FMT_BIN
00035 } FILEFMT;
00036 
00040 struct fioparms {
00041   int    op;
00042   const char * mode;
00043   const char * iodesc;
00044   const char * dir;
00045   const char * rw;
00046 };
00047 
00048 enum {
00049   FIO_READ,
00050   FIO_WRITE
00051 };
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00057 const char * fmtstr(FILEFMT format);
00058 
00059 int fileio_setparms(int op, struct fioparms * fp);
00060 
00061 #if 0
00062 int fileio(int op, char * filename, FILEFMT format,
00063            struct avrpart * p, char * memtype, int size);
00064 #endif
00065 
00066 extern int fileio_ihex(struct fioparms * fio, 
00067                   const char * filename, FILE * f, unsigned char * buf, int size);
00068 
00069 #ifdef __cplusplus
00070 }
00071 #endif
00072 
00073 #endif

Generated on Fri Apr 22 06:54:11 2011 for SFB by doxygen 1.5.9