19#include "pw_bytes/span.h"
20#include "pw_checksum/crc32.h"
21#include "pw_hdlc/internal/protocol.h"
22#include "pw_status/status.h"
23#include "pw_stream/stream.h"
76 return StartFrame(address, UFrameControl::UnnumberedInformation().data());
88 static constexpr std::byte kUnusedControl = std::byte{0};
90 Status StartFrame(uint64_t address, std::byte control);
Encodes and writes HDLC frames.
Definition: encoder.h:68
Status WriteUIFrame(uint64_t address, ConstByteSpan payload, stream::Writer &writer)
Writes an HDLC unnumbered information frame (UI frame) to the provided pw::stream writer.
Status FinishFrame()
Finishes a frame. Writes the frame check sequence and a terminating flag.
Status WriteData(ConstByteSpan data)
Status StartUnnumberedFrame(uint64_t address)
Definition: encoder.h:75
constexpr Encoder(stream::Writer &output)
Construct an encoder which will write data to output.
Definition: encoder.h:71
Serial comms library.
Definition: decoder.h:29