opentitanlib::test_utils::i2c_target

Type Alias I2cTransferStart

Source
pub type I2cTransferStart = i2c_transfer_start_t;

Aliased Type§

struct I2cTransferStart {
    pub length: u8,
    pub address: u8,
    pub stop: bool,
    pub data: ArrayVec<u8, 256>,
}

Fields§

§length: u8§address: u8§stop: bool§data: ArrayVec<u8, 256>

Implementations§

Source§

impl I2cTransferStart

Source

pub fn new(address: u8, content: &[u8], stop: bool) -> Self

Source

pub fn execute_read<F>(&self, uart: &dyn Uart, f: F) -> Result<()>
where F: FnOnce() -> Result<()>,

Source

pub fn execute_write<F>(uart: &dyn Uart, f: F) -> Result<Self>
where F: FnOnce() -> Result<()>,

Source

pub fn execute_write_slow<F>(uart: &dyn Uart, f: F) -> Result<Self>
where F: FnOnce() -> Result<()>,

Source

pub fn execute_write_read<F>(&self, uart: &dyn Uart, f: F) -> Result<Self>
where F: FnOnce() -> Result<()>,