1130812Smarcel/* XMODEM support for GDB, the GNU debugger.
2130812Smarcel   Copyright 1995, 2000 Free Software Foundation, Inc.
3130812Smarcel
4130812Smarcel   This file is part of GDB.
5130812Smarcel
6130812Smarcel   This program is free software; you can redistribute it and/or modify
7130812Smarcel   it under the terms of the GNU General Public License as published by
8130812Smarcel   the Free Software Foundation; either version 2 of the License, or
9130812Smarcel   (at your option) any later version.
10130812Smarcel
11130812Smarcel   This program is distributed in the hope that it will be useful,
12130812Smarcel   but WITHOUT ANY WARRANTY; without even the implied warranty of
13130812Smarcel   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14130812Smarcel   GNU General Public License for more details.
15130812Smarcel
16130812Smarcel   You should have received a copy of the GNU General Public License
17130812Smarcel   along with this program; if not, write to the Free Software
18130812Smarcel   Foundation, Inc., 59 Temple Place - Suite 330,
19130812Smarcel   Boston, MA 02111-1307, USA.  */
20130812Smarcel
21130812Smarcelstruct serial;
22130812Smarcel
23130812Smarcelint xmodem_init_xfer (struct serial *desc);
24130812Smarcelvoid send_xmodem_packet (struct serial *desc, unsigned char *packet, int len,
25130812Smarcel			 int hashmark);
26130812Smarcelvoid xmodem_finish_xfer (struct serial *desc);
27130812Smarcel
28130812Smarcel#define XMODEM_DATASIZE	128	/* The data size is ALWAYS 128 */
29130812Smarcel#define XMODEM_1KDATASIZE 1024	/* Unless it's 1024!!! */
30130812Smarcel#define XMODEM_PACKETSIZE 133	/* data + packet headers and crc */
31130812Smarcel#define XMODEM_1KPACKETSIZE 1024 + 5	/* data + packet headers and crc */
32130812Smarcel#define XMODEM_DATAOFFSET 3	/* Offset to start of actual data */
33