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§
Structs§
- Parsed
Msg - Payload
Header - 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
- Wire
Type - 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.