BeRTOS
|
X-Modem serial transmission protocol (implementation) More...
#include "xmodem.h"
#include "cfg/cfg_xmodem.h"
#include <cfg/debug.h>
#include <cfg/log.h>
#include <algo/crc.h>
#include <string.h>
Go to the source code of this file.
Defines | |
#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. | |
Functions | |
bool | xmodem_recv (KFile *ch, KFile *fd) |
Receive a file using the XModem protocol. | |
bool | xmodem_send (KFile *ch, KFile *fd) |
Transmit some data using the XModem protocol. |
X-Modem serial transmission protocol (implementation)
Supports the CRC-16 and 1K-blocks variants of the standard.
Definition in file xmodem.c.
Receive a file using the XModem protocol.
ch | Channel to use for transfer |
fd | Destination file |
Transmit some data using the XModem protocol.
ch | Channel to use for transfer |
fd | Source file |