Skip to main content

Module frame

Module frame 

Source
Expand description

The EZSP frame header: sequence, frame control and frame id.

Every EZSP exchange starts with a version command in the legacy format (one-byte frame control and frame id). Once the NCP has answered with protocol version 8 or later, both sides use the extended format: a two-byte frame control (whose high byte carries the format version, 1) and a two-byte frame id.

Structs§

Header
A parsed frame header and its parameters.

Enums§

Format
Which header layout a frame uses.
HeaderError
Frame header errors.

Constants§

CONTROL_ASYNC_CALLBACK
Frame control: an asynchronous callback (the UART host’s normal case).
CONTROL_HIGH_FORMAT_1
Extended frame control high byte: format version 1, unsecured, unpadded.
CONTROL_OVERFLOW
Frame control: the NCP ran out of memory since the last response.
CONTROL_PENDING_CALLBACKS
Frame control: the NCP has callbacks waiting.
CONTROL_RESPONSE
Frame control: set in responses and callbacks (NCP to host).
CONTROL_SYNC_CALLBACK
Frame control: a synchronous callback.
CONTROL_TRUNCATED
Frame control: the NCP truncated this response.

Functions§

detect_command_format
The format of a frame from the host, as the NCP sees it: the legacy version command is exactly four bytes with frame id zero.
encode
Build a frame.
parse
Parse a frame in the given format.