Expand description
§mote-api
sans-io message and wire-protocol definitions for the Mote firmware <–> host driver link.
no_std + alloc.
§Usage
use mote_api::{HostLink, MoteLink};
use mote_api::messages::host_to_mote;
let mut host_side = MoteLink::new();
let mut mote_side = HostLink::new();
host_side.send(host_to_mote::Message::Ping).unwrap();
while let Some(packet) = host_side.poll_transmit() {
mote_side.handle_receive(&packet);
}
assert_eq!(mote_side.poll_receive().unwrap(), Some(host_to_mote::Message::Ping));See docs.rs/mote-api for the full API.
Modules§
- messages
- Message type definitions sent over the mote/host link.
Structs§
- Mote
Comms - Bidirectional SansIO communication link betweek mote and the host.
- Version
- The mote-api crate version embedded in every message header.
Enums§
Traits§
- Message
Role - Identifies which side of the mote/host link decodes a given message type.
Type Aliases§
- Host
Config Link - Used by Mote to send data to and receive commands from the host
- Host
Link - Used by Mote to send data to and receive commands from the host
- Mote
Config Link - Used by the host to send commands to and receive data from Mote
- Mote
Link - Used by the host to send commands to and receive data from Mote