pub struct DeviceInterface<Spi> {
pub spi: Spi,
}Expand description
The SPI Device wrapper interface to the driver
Fields§
§spi: SpiThe SPI device used to communicate with the iC-MD device.
Implementations§
Source§impl<Spi> DeviceInterface<Spi>
impl<Spi> DeviceInterface<Spi>
Trait Implementations§
Source§impl<Spi: Debug> Debug for DeviceInterface<Spi>
impl<Spi: Debug> Debug for DeviceInterface<Spi>
Source§impl<Spi: SpiDevice> RegisterInterface for DeviceInterface<Spi>
impl<Spi: SpiDevice> RegisterInterface for DeviceInterface<Spi>
Source§type AddressType = u8
type AddressType = u8
The address type used by this interface. Should likely be an integer.
Source§fn write_register(
&mut self,
address: Self::AddressType,
_size_bits: u32,
data: &[u8],
) -> Result<(), Self::Error>
fn write_register( &mut self, address: Self::AddressType, _size_bits: u32, data: &[u8], ) -> Result<(), Self::Error>
Write the given data to the register located at the given address
Source§fn read_register(
&mut self,
address: Self::AddressType,
_size_bits: u32,
data: &mut [u8],
) -> Result<(), Self::Error>
fn read_register( &mut self, address: Self::AddressType, _size_bits: u32, data: &mut [u8], ) -> Result<(), Self::Error>
Read the register located at the given addres to the given data slice
Auto Trait Implementations§
impl<Spi> Freeze for DeviceInterface<Spi>where
Spi: Freeze,
impl<Spi> RefUnwindSafe for DeviceInterface<Spi>where
Spi: RefUnwindSafe,
impl<Spi> Send for DeviceInterface<Spi>where
Spi: Send,
impl<Spi> Sync for DeviceInterface<Spi>where
Spi: Sync,
impl<Spi> Unpin for DeviceInterface<Spi>where
Spi: Unpin,
impl<Spi> UnwindSafe for DeviceInterface<Spi>where
Spi: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more