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. | |
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.
Definition in file xmodem.c.
Function Documentation
Receive a file using the XModem protocol.
- Parameters:
-
ch Channel to use for transfer fd Destination file
- Note:
- This function allocates a large amount of stack (
- See also:
- XM_BUFSIZE).
Transmit some data using the XModem protocol.
- Parameters:
-
ch Channel to use for transfer fd Source file
- Note:
- This function allocates a large amount of stack for the XModem transfer buffer (
- See also:
- XM_BUFSIZE).
![(please configure the [header_logo] section in trac.ini)](/chrome/site/bertos_logo.png)