/* FRCProg v0.1 * (c) 2006 Harry Bock, Team 1350 * Load a HEX file compiled for the PIC18Fxxxx used for the FRC * * 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. */ #ifndef _IHEX_H #define _IHEX_H typedef unsigned char byte; typedef unsigned short word; typedef unsigned long dword; #define IHEX_SCANBYTE "%02X" #define IHEX_SCANWORD "%04X" #define IHEX_DATA 0x00 #define IHEX_EOF 0x01 #define IHEX_SEGMENT_ADDR 0x02 #define IHEX_LINEAR_ADDR 0x04 struct ihex_record { byte length; word address; byte record_type; byte data[16]; byte checksum; }; byte *ihex_parse_file(char*); int ihex_parse_record(char*, byte*); #endif