Crate esp_hosted

Source
Expand description

An interface for interacting with ESP-Hosted-MCU firmware, via UART.

Re-exports§

pub use proto::Rpc as RpcP;
pub use proto::RpcId as RpcIdP;
pub use proto::RpcType as RpcTypeP;
pub use proto_data::RpcId;
pub use crate::proto_data::RpcId;
pub use proto::*;

Modules§

proto
proto_data
Contains data types specific to the ESP-Hosted-MCU proto buffer. This contains definitions for the data types [de]serialized. They’re not automatically generated from the .proto file, and are used in our higher-level API.
wifi
This module contains Wi-Fi and BLE-specific functionality.

Macros§

copy_le
parse_le

Structs§

ParsedMsg
PayloadHeader
Adapted from esp-hosted-mcu/common/esp_hosted_header.h This is at the start of the message, and is followed by the RPC header. See ESP-hosted-MCU readme, section 7.1.

Enums§

EspError
A simple error enum for our host-side protocol
RpcPayload
WireType
https://protobuf.dev/programming-guides/encoding/

Functions§

cfg_heartbeat
Minimum of 10s.
parse_msg
Parse the payload header, and separate the RPC bytes from the whole message. Accepts the whole message received.
setup_rpc_proto
Sets up an RPC command to write using the automatic protbuf decoding from micropb. This is flexible, and allows writing arbitrary commands, but its interface isn’t as streamlined as our native impl.
write_rpc_raw
Write an automatically-decoded protobuf message directly.