Trait lps22hb::interface::Interface [−][src]
pub trait Interface {
type Error;
fn write(&mut self, addr: u8, value: u8) -> Result<(), Self::Error>;
fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Self::Error>;
}
Expand description
Interface Trait. SpiInterface
and I2cInterface
implement this.
Associated Types
Required methods
Writes a byte to a sensor’s specified register address.
Arguments
addr
- register addressvalue
- value to write