PrefixRead

Trait PrefixRead 

Source
pub trait PrefixRead {
    type Error;

    // Required method
    fn prefix_read(
        &mut self,
        prefix: &[u8],
        data: &mut [u8],
    ) -> Result<(), Self::Error>;
}
Expand description

PrefixRead trait provides a higher level, write then read function

Required Associated Types§

Required Methods§

Source

fn prefix_read( &mut self, prefix: &[u8], data: &mut [u8], ) -> Result<(), Self::Error>

Read writes the prefix buffer then reads into the input buffer Note that the values of the input buffer will also be output, because, SPI…

Implementors§

Source§

impl<T> PrefixRead for T
where T: SpiDevice<u8>, <T as ErrorType>::Error: Debug,

Automatic driver_pal::PrefixRead implementation for objects implementing embedded_hal::spi::SpiDevice.