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"
69 return StartFrame(address, UFrameControl::UnnumberedInformation().data());
81 static constexpr std::byte kUnusedControl = std::byte{0};
83 Status StartFrame(uint64_t address, std::byte control);
Encodes and writes HDLC frames.
Definition: encoder.h:61
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:68
constexpr Encoder(stream::Writer &output)
Constructs an encoder which will write data to output.
Definition: encoder.h:64