xmodem.c File Reference

X-Modem serial transmission protocol (implementation). More...

#include "xmodem.h"
#include <appconfig.h>
#include <string.h>
#include <drv/ser.h>
#include <algo/crc.h>
#include <cfg/debug.h>

Go to the source code of this file.


Defines

#define XM_MAXRETRIES   15
 Max retries before giving up.
#define XM_MAXCRCRETRIES   7
 Max retries before switching to BCC.
#define XM_BUFSIZE   128
 128 bytes of block buffer
Protocol control codes
#define XM_SOH   0x01
 Start Of Header (128-byte block).
#define XM_STX   0x02
 Start Of Header (1024-byte block).
#define XM_EOT   0x04
 End Of Transmission.
#define XM_ACK   0x06
 Acknowledge block.
#define XM_NAK   0x15
 Negative Acknowledge.
#define XM_C   0x43
 Request CRC-16 transmission.
#define XM_CAN   0x18
 CANcel transmission.

Detailed Description

X-Modem serial transmission protocol (implementation).

Supports the CRC-16 and 1K-blocks variants of the standard.

See also:
ymodem.txt for the protocol description.
Version:
Id
xmodem.c 1232 2008-04-09 16:31:19Z batt
Author:
Bernardo Innocenti <bernie@develer.com>

Francesco Sacchi <batt@develer.com>

Definition in file xmodem.c.