ether2ser 0.1.0
Ethernet <-> synchronous V.24 bridge firmware for RP2040 + W5500
Loading...
Searching...
No Matches
hdlc_encoder.h
Go to the documentation of this file.
1/*
2 * ether2ser — Ethernet <-> synchronous V.24 (RS-232/V.28) bridge
3 *
4 * File: src/protocol/hdlc_encoder.h
5 * Purpose: HDLC encoder API.
6 *
7 * SPDX-License-Identifier: Apache-2.0
8 *
9 * Copyright (c) 2026 Florian <f.leuze@outlook.de>
10 */
11
12#ifndef HDLC_ENCODER_H
13#define HDLC_ENCODER_H
14
15// Related headers
16
17// Standard library headers
18#include <stdbool.h>
19#include <stddef.h>
20#include <stdint.h>
21
22// Project Headers
23#include "hdlc_common.h"
24
25// Generated headers
26
35bool hdlc_encode(const uint8_t* payload, const size_t payload_length, HDLC_FRAME_T* frame,
36 bool lsb_first);
37
45bool hdlc_encode_byte(const uint8_t* payload, const size_t payload_length, HDLC_FRAME_T* frame);
46
47#endif /* HDLC_ENCODER_H */
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.
Generic HDLC frame buffer descriptor.
Definition hdlc_common.h:38