34#ifndef PROTOCORE_DNC_H
35#define PROTOCORE_DNC_H
39#if PROTOCORE_ENABLE_DNC
74uint8_t protocore_dnc_iso_to_eia(
char c);
83char protocore_dnc_eia_to_iso(uint8_t b);
90uint8_t protocore_dnc_iso_add_parity(uint8_t ascii7);
99void protocore_dnc_flow_init(DncFlow *f);
106proto_bool protocore_dnc_flow_feed(DncFlow *f, uint8_t rx);
109static inline proto_bool protocore_dnc_flow_can_send(
const DncFlow *f)
133size_t protocore_dnc_encode_block(
const DncCfg *cfg,
const char *line,
size_t line_len, uint8_t *out,
size_t out_cap);
143size_t protocore_dnc_encode_marker(
const DncCfg *cfg, uint8_t *out,
size_t out_cap);
149size_t protocore_dnc_encode_leader(
const DncCfg *cfg, uint8_t *out,
size_t out_cap);
173void protocore_dnc_decode_init(DncDecoder *d, DncCode code);
187DncEvent protocore_dnc_decode_feed(DncDecoder *d, uint8_t wire);
#define PROTOCORE_DNC_LINE_MAX
Largest G-code block (one line) the DNC decoder reassembles (PROTOCORE_ENABLE_DNC).
PROTO_ENUM_PACKED
Application protocol spoken on a listener port or connection slot.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS