pub trait Interface {
type Error;
// Required methods
fn read_register(
&mut self,
register: u8,
buffer: &mut [u8],
) -> Result<(), Self::Error>;
fn write_register(
&mut self,
register: u8,
bytes: &[u8],
) -> Result<(), Self::Error>;
}Expand description
This Trait allows all the other Bus agnostic code to interface with a common bus independent api
The trait is not meant to be supper preferment as any code that needs to be particularly preformat probably wants to go in bus specific code.