Read

Trait Read 

Source
pub trait Read<'a> {
    type ReadBitsType: 'a + for<'b> ReadBits<'b>;

    // Required method
    fn start_reading(&'a mut self) -> Self::ReadBitsType;
}
Expand description

Defines how the MCU should use the SCK and SDA pins to read data.

It is assumed the reading isn’t super important (mostly for debugging purposes); and the implementation is actually quite hard because some commands read without a dummy bit and some read with a dummy bit. So the user can choose to simply not implement it. The write commands of Commands will still work in that case.

Calling start_reading() should switch the device into reading mode, which should be switched back into writing mode when the returned object of start_reading() is dropped.

Required Associated Types§

Source

type ReadBitsType: 'a + for<'b> ReadBits<'b>

Required Methods§

Source

fn start_reading(&'a mut self) -> Self::ReadBitsType

Implementors§

Source§

impl<'a, W: Read<'a>> Read<'a> for AdapterU8<W>

Source§

impl<'a, W: Read<'a>> Read<'a> for AdapterU8s<W>