Trait radio::State

source ·
pub trait State {
    type State: RadioState;
    type Error: Debug;

    // Required methods
    fn set_state(&mut self, state: Self::State) -> Result<(), Self::Error>;
    fn get_state(&mut self) -> Result<Self::State, Self::Error>;
}
Expand description

State trait for configuring and reading radio states

Note that drivers will internally configure and read radio states to manage radio operations.

Required Associated Types§

source

type State: RadioState

Radio state

source

type Error: Debug

Radio error type

Required Methods§

source

fn set_state(&mut self, state: Self::State) -> Result<(), Self::Error>

Set the radio to a specified state

source

fn get_state(&mut self) -> Result<Self::State, Self::Error>

Fetch the current radio state

Implementors§

source§

impl<St, Reg, Ch, Inf, Irq, E> State for Radio<St, Reg, Ch, Inf, Irq, E>

§

type State = St

§

type Error = E