Skip to main content

Crate mote_api

Crate mote_api 

Source
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§

MoteComms
Bidirectional SansIO communication link betweek mote and the host.
Version
The mote-api crate version embedded in every message header.

Enums§

Error
Error type
Role
Which side of the mote/host link a piece of code represents.

Traits§

MessageRole
Identifies which side of the mote/host link decodes a given message type.

Type Aliases§

HostConfigLink
Used by Mote to send data to and receive commands from the host
HostLink
Used by Mote to send data to and receive commands from the host
MoteConfigLink
Used by the host to send commands to and receive data from Mote
MoteLink
Used by the host to send commands to and receive data from Mote