|
TinyPPP
PPP networking over any Arduino Stream
|
HDLC frame encoder (RFC 1662). More...
#include <HDLC.h>
Public Member Functions | |
| void | begin (uint16_t protocol, bool escapeAllControl=false) |
| Starts a frame with address/control header and the protocol number. | |
| void | data (const uint8_t *buf, size_t len) |
| Adds payload bytes. | |
| void | data (uint8_t b) |
| Adds one payload byte. | |
| bool | end () |
| Appends FCS and closing flag; returns false if the output dropped bytes. | |
| void | setACCM (uint32_t accm) |
| Async-Control-Character-Map of the peer: control chars to escape. | |
| void | setOutput (Print *out) |
| Defines the output (e.g. the serial port) | |
HDLC frame encoder (RFC 1662).
Writes one HDLC frame at a time to a Print. Output is collected in a small buffer so that the underlying (USB) serial gets reasonably sized writes.
Starts a frame with address/control header and the protocol number.
|
inline |
Appends FCS and closing flag; returns false if the output dropped bytes.
Async-Control-Character-Map of the peer: control chars to escape.