pub trait I2CMaster<'a> {
// Required methods
fn set_master_client(&self, master_client: &'a dyn I2CHwMasterClient);
fn enable(&self);
fn disable(&self);
fn write_read(
&self,
addr: u8,
data: &'static mut [u8],
write_len: usize,
read_len: usize,
) -> Result<(), (Error, &'static mut [u8])>;
fn write(
&self,
addr: u8,
data: &'static mut [u8],
len: usize,
) -> Result<(), (Error, &'static mut [u8])>;
fn read(
&self,
addr: u8,
buffer: &'static mut [u8],
len: usize,
) -> Result<(), (Error, &'static mut [u8])>;
}
Expand description
Interface for an I2C Master hardware driver.