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

Go to the source code of this file.
Macros | |
| #define | HDLC_CRC16_CCITT_INIT 0xFFFFu |
| #define | HDLC_CRC16_CCITT_POLY 0x1021u |
| #define | HDLC_CRC16_CCITT_MSB_MASK 0x8000u |
| #define | HDLC_CRC16_BITS_PER_BYTE 8u |
Functions | |
| static uint16_t | crc16_ccitt_false (const uint8_t *payload, size_t num_bytes) |
| uint16_t | hdlc_crc16 (const uint8_t *payload, size_t num_bytes) |
| Compute HDLC CRC16 (FCS) over a payload. | |
| #define HDLC_CRC16_BITS_PER_BYTE 8u |
Definition at line 26 of file hdlc_common.c.
| #define HDLC_CRC16_CCITT_INIT 0xFFFFu |
Definition at line 23 of file hdlc_common.c.
| #define HDLC_CRC16_CCITT_MSB_MASK 0x8000u |
Definition at line 25 of file hdlc_common.c.
| #define HDLC_CRC16_CCITT_POLY 0x1021u |
Definition at line 24 of file hdlc_common.c.
|
static |
Definition at line 28 of file hdlc_common.c.
References HDLC_CRC16_BITS_PER_BYTE, HDLC_CRC16_CCITT_INIT, HDLC_CRC16_CCITT_MSB_MASK, and HDLC_CRC16_CCITT_POLY.
Referenced by hdlc_crc16().

| uint16_t hdlc_crc16 | ( | const uint8_t * | payload, |
| size_t | num_bytes | ||
| ) |
Compute HDLC CRC16 (FCS) over a payload.
| payload | Input data bytes. |
| num_bytes | Number of bytes in payload. |
Definition at line 45 of file hdlc_common.c.
References crc16_ccitt_false().
Referenced by hdlc_decode(), hdlc_decode_byte(), hdlc_encode(), and hdlc_encode_byte().

