pub trait TwiTransaction {
// Required methods
fn get_retry_strategy(&self, isotoken: Isolated) -> RetryStrategy;
fn get_initial_addr_bin(&self, isotoken: Isolated) -> u8;
fn get_read_addr_bin(&self, isotoken: Isolated) -> Option<u8>;
fn get_tx_byte(
&self,
isotoken: Isolated,
index: usize
) -> OxideResult<u8, IoError>;
fn set_rx_byte(
&mut self,
isotoken: Isolated,
index: usize,
byte: u8
) -> OxideResult<usize, IoError>;
}
Required Methods§
sourcefn get_retry_strategy(&self, isotoken: Isolated) -> RetryStrategy
fn get_retry_strategy(&self, isotoken: Isolated) -> RetryStrategy
Get the retry strategy to follow for this transaction
sourcefn get_initial_addr_bin(&self, isotoken: Isolated) -> u8
fn get_initial_addr_bin(&self, isotoken: Isolated) -> u8
Get the initial address to use for this transaction, as an 8-bit TWI address (i.e. including the read/write direction bit)
sourcefn get_read_addr_bin(&self, isotoken: Isolated) -> Option<u8>
fn get_read_addr_bin(&self, isotoken: Isolated) -> Option<u8>
Get the read address for this transaction. Returns None if there is no read address (i.e. this is a write-only transaction.)
sourcefn get_tx_byte(
&self,
isotoken: Isolated,
index: usize
) -> OxideResult<u8, IoError>
fn get_tx_byte( &self, isotoken: Isolated, index: usize ) -> OxideResult<u8, IoError>
Get the byte to transmit at the given packet index, or return an error if there is no such byte.