pub struct SPIPeripheral<'a, SPI, CS, E> { /* private fields */ }Expand description
A struct to implement the Interface trait
This seems to work but is not extensively tested
Implementations§
Source§impl<'a, SPI, CS, E> SPIPeripheral<'a, SPI, CS, E>
impl<'a, SPI, CS, E> SPIPeripheral<'a, SPI, CS, E>
pub fn new(bus: &'a mut SPI, cs: &'a mut CS) -> Self
Trait Implementations§
Source§impl<'a, SPI, CS, E> Interface for SPIPeripheral<'a, SPI, CS, E>
impl<'a, SPI, CS, E> Interface for SPIPeripheral<'a, SPI, CS, E>
Source§fn read_register(
&mut self,
register: u8,
buffer: &mut [u8],
) -> Result<(), Self::Error>
fn read_register( &mut self, register: u8, buffer: &mut [u8], ) -> Result<(), Self::Error>
This is pretty much just filler code for now
Source§fn write_register(
&mut self,
register: u8,
bytes: &[u8],
) -> Result<(), Self::Error>
fn write_register( &mut self, register: u8, bytes: &[u8], ) -> Result<(), Self::Error>
This is pretty much just filler code for now
type Error = InterfaceError<E>
Auto Trait Implementations§
impl<'a, SPI, CS, E> Freeze for SPIPeripheral<'a, SPI, CS, E>
impl<'a, SPI, CS, E> RefUnwindSafe for SPIPeripheral<'a, SPI, CS, E>
impl<'a, SPI, CS, E> Send for SPIPeripheral<'a, SPI, CS, E>
impl<'a, SPI, CS, E> Sync for SPIPeripheral<'a, SPI, CS, E>
impl<'a, SPI, CS, E> Unpin for SPIPeripheral<'a, SPI, CS, E>where
E: Unpin,
impl<'a, SPI, CS, E> !UnwindSafe for SPIPeripheral<'a, SPI, CS, E>
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