pub trait Interface {
type Error: Debug;
// Required methods
fn write(&mut self, frame: &[u8]) -> Result<(), Self::Error>;
fn wait_ready(&mut self) -> Poll<Result<(), Self::Error>>;
fn read(&mut self, buf: &mut [u8]) -> Result<(), Self::Error>;
}
Expand description
Abstraction over the different serial links. Either SPI, I2C or HSU (High Speed UART).
Required Associated Types§
Required Methods§
Implementations on Foreign Types§
Implementors§
source§impl Interface for SerialPortInterface
Available on crate feature std
only.
impl Interface for SerialPortInterface
Available on crate feature
std
only.