pub struct SpiDevice<SPI, GPIO> { /* private fields */ }
Expand description
A SPI device. Use a SPI device when the MPU9250 is connected via SPI
Implementations§
Trait Implementations§
source§impl<SPI, NCS, E, EO> Device for SpiDevice<SPI, NCS>where
SPI: Write<u8, Error = E> + Transfer<u8, Error = E>,
NCS: OutputPin<Error = EO>,
impl<SPI, NCS, E, EO> Device for SpiDevice<SPI, NCS>where SPI: Write<u8, Error = E> + Transfer<u8, Error = E>, NCS: OutputPin<Error = EO>,
source§fn read_many(
&mut self,
reg: Register,
buffer: &mut [u8]
) -> Result<(), Self::Error>
fn read_many( &mut self, reg: Register, buffer: &mut [u8] ) -> Result<(), Self::Error>
Read many values from register
source§fn write(&mut self, reg: Register, val: u8) -> Result<(), Self::Error>
fn write(&mut self, reg: Register, val: u8) -> Result<(), Self::Error>
Write the provided value to register
source§fn write_many(
&mut self,
reg: Register,
buffer: &[u8]
) -> Result<(), Self::Error>
fn write_many( &mut self, reg: Register, buffer: &[u8] ) -> Result<(), Self::Error>
Write the provided data block (up to 16 bytes) to register
Auto Trait Implementations§
impl<SPI, GPIO> RefUnwindSafe for SpiDevice<SPI, GPIO>where GPIO: RefUnwindSafe, SPI: RefUnwindSafe,
impl<SPI, GPIO> Send for SpiDevice<SPI, GPIO>where GPIO: Send, SPI: Send,
impl<SPI, GPIO> Sync for SpiDevice<SPI, GPIO>where GPIO: Sync, SPI: Sync,
impl<SPI, GPIO> Unpin for SpiDevice<SPI, GPIO>where GPIO: Unpin, SPI: Unpin,
impl<SPI, GPIO> UnwindSafe for SpiDevice<SPI, GPIO>where GPIO: UnwindSafe, 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