Trait trellis::devices::I2CMasterDevice
[−]
[src]
pub trait I2CMasterDevice { fn write_block(&mut self, register: u8, values: &[u8]) -> Result<()>; fn read_block(&mut self, register: u8, len: u8) -> Result<Vec<u8>>; }
Host devices that are connected to the Trellis. The Trellis is the slave. This trate is a small abstraction over the full I2C since we need only a very small subset. This trate exists also to make the I2C communciation testable (see also MockDevice that implements this trait).
Required Methods
fn write_block(&mut self, register: u8, values: &[u8]) -> Result<()>
fn read_block(&mut self, register: u8, len: u8) -> Result<Vec<u8>>
Implementors
impl I2CMasterDevice for RaspberryPiBPlus
impl I2CMasterDevice for MockDevice