Base class for YModemRx and YModemTx. More...
#include <ymodem.h>

Protected Types | |
| enum | ControlCharacters |
| enum | Error { ErrorTimeout = -200, ErrorBlockRetriesExceded = -201 } |
Protected Member Functions | |
| uint8_t | Checksum (const uint8_t *data, size_t size) |
| uint16_t | CRC16 (const uint8_t *data, size_t size) |
| uint16_t | UpdateCRC16 (uint16_t crcIn, uint8_t byte) |
| int | InChar (unsigned timeout) |
| void | Cancel () |
Protected Attributes | |
| SerialPort & | Port |
Base class for YModemRx and YModemTx.
Definition at line 46 of file ymodem.h.
enum YModem::ControlCharacters [protected] |
enum YModem::Error [protected] |
Checksum a block of data.
| data | Start of data to checksum. | |
| size | Size of data. |
Definition at line 66 of file ymodem.cpp.
Calculate CRC for a block of data.
| data | Start of data to checksum. | |
| size | Size of data. |
Definition at line 54 of file ymodem.cpp.
Update CRC value by accumulating another byte of data.
| crcIn | Previous CRC value. | |
| byte | A byte of data. |
Definition at line 36 of file ymodem.cpp.
| int YModem::InChar | ( | unsigned | timeout | ) | [protected] |
Receive a single character. If the timeout period is exceeded, ErrorTimeout is returned.
| timeout | Time in milliseconds to wait if no data available. |
Definition at line 76 of file ymodem.cpp.
| void YModem::Cancel | ( | ) | [protected] |
Send CANcel sequence.
Definition at line 88 of file ymodem.cpp.
SerialPort& YModem::Port [protected] |
1.6.1