pub trait Transmit {
type Error: Debug;
// Required methods
fn start_transmit(&mut self, data: &[u8]) -> Result<(), Self::Error>;
fn check_transmit(&mut self) -> Result<bool, Self::Error>;
}
Expand description
Transmit trait for radios that can transmit packets
start_transmit
should be called to load data into the radio, with check_transmit
called
periodically (or using interrupts) to continue and finalise the transmission.
Required Associated Types§
Required Methods§
sourcefn start_transmit(&mut self, data: &[u8]) -> Result<(), Self::Error>
fn start_transmit(&mut self, data: &[u8]) -> Result<(), Self::Error>
Start sending a packet on the provided channel
Returns an error if send was not started
sourcefn check_transmit(&mut self) -> Result<bool, Self::Error>
fn check_transmit(&mut self) -> Result<bool, Self::Error>
Check for send completion
Returns true for send complete, false otherwise