|
ether2ser 0.1.0
Ethernet <-> synchronous V.24 bridge firmware for RP2040 + W5500
|


Go to the source code of this file.
Functions | |
| bool | hdlc_encode (const uint8_t *payload, const size_t payload_length, HDLC_FRAME_T *frame, bool lsb_first) |
| Encode payload into an HDLC bit-stuffed frame. | |
| bool | hdlc_encode_byte (const uint8_t *payload, const size_t payload_length, HDLC_FRAME_T *frame) |
| Encode payload using byte-escaping HDLC compatibility path. | |
| bool hdlc_encode | ( | const uint8_t * | payload, |
| const size_t | payload_length, | ||
| HDLC_FRAME_T * | frame, | ||
| bool | lsb_first | ||
| ) |
Encode payload into an HDLC bit-stuffed frame.
| payload | Input payload bytes. |
| payload_length | Number of payload bytes. |
| frame | Output frame descriptor and storage. |
| lsb_first | Bit order selector for bit-wise encoding. |
Definition at line 171 of file hdlc_encoder.c.
References HDLC_FRAME_T::capacity, ENCODER_ZERO_PAD_AND_DRAIN, hdlc_crc16(), HDLC_FLAG_BYTE, hdlc_put_byte(), HDLC_TRY_PUT_BYTE, HDLC_FRAME_T::length, LOG_DEBUG, hdlc_encoder_t::out_byte, and HDLC_FRAME_T::payload.
Referenced by tx_queue_enqueue_udp_frame().


| bool hdlc_encode_byte | ( | const uint8_t * | payload, |
| const size_t | payload_length, | ||
| HDLC_FRAME_T * | frame | ||
| ) |
Encode payload using byte-escaping HDLC compatibility path.
| payload | Input payload bytes. |
| payload_length | Number of payload bytes. |
| frame | Output frame descriptor and storage. |
Definition at line 57 of file hdlc_encoder.c.
References HDLC_FRAME_T::capacity, hdlc_crc16(), hdlc_escape_if_needed(), HDLC_FLAG_BYTE, HDLC_TRY_PUT_BYTE, HDLC_FRAME_T::length, LOG_DEBUG, and HDLC_FRAME_T::payload.
