[−][src]Struct bno080::interface::spi::SpiInterface
This combines the SPI peripheral and associated control pins
Methods
impl<SPI, CSN, IN, RSTN, CommE, PinE> SpiInterface<SPI, CSN, IN, RSTN> where
SPI: Write<u8, Error = CommE> + Transfer<u8, Error = CommE>,
CSN: OutputPin<Error = PinE>,
IN: InputPin<Error = PinE>,
RSTN: OutputPin<Error = PinE>,
CommE: Debug,
PinE: Debug,
[src]
SPI: Write<u8, Error = CommE> + Transfer<u8, Error = CommE>,
CSN: OutputPin<Error = PinE>,
IN: InputPin<Error = PinE>,
RSTN: OutputPin<Error = PinE>,
CommE: Debug,
PinE: Debug,
pub fn new(lines: SpiControlLines<SPI, CSN, IN, RSTN>) -> Self
[src]
Trait Implementations
impl<SPI, CSN, IN, RS, CommE, PinE> SensorInterface for SpiInterface<SPI, CSN, IN, RS> where
SPI: Write<u8, Error = CommE> + Transfer<u8, Error = CommE>,
CSN: OutputPin<Error = PinE>,
IN: InputPin<Error = PinE>,
RS: OutputPin<Error = PinE>,
CommE: Debug,
PinE: Debug,
[src]
SPI: Write<u8, Error = CommE> + Transfer<u8, Error = CommE>,
CSN: OutputPin<Error = PinE>,
IN: InputPin<Error = PinE>,
RS: OutputPin<Error = PinE>,
CommE: Debug,
PinE: Debug,
type SensorError = Error<CommE, PinE>
Interface error type
fn requires_soft_reset(&self) -> bool
[src]
fn setup(
&mut self,
delay_source: &mut impl DelayMs<u8>
) -> Result<(), Self::SensorError>
[src]
&mut self,
delay_source: &mut impl DelayMs<u8>
) -> Result<(), Self::SensorError>
fn send_and_receive_packet(
&mut self,
send_buf: &[u8],
recv_buf: &mut [u8]
) -> Result<usize, Self::SensorError>
[src]
&mut self,
send_buf: &[u8],
recv_buf: &mut [u8]
) -> Result<usize, Self::SensorError>
fn write_packet(&mut self, packet: &[u8]) -> Result<(), Self::SensorError>
[src]
fn read_packet(
&mut self,
recv_buf: &mut [u8]
) -> Result<usize, Self::SensorError>
[src]
&mut self,
recv_buf: &mut [u8]
) -> Result<usize, Self::SensorError>
Read a complete packet from the sensor
fn read_with_timeout(
&mut self,
recv_buf: &mut [u8],
delay_source: &mut impl DelayMs<u8>,
max_ms: u8
) -> Result<usize, Self::SensorError>
[src]
&mut self,
recv_buf: &mut [u8],
delay_source: &mut impl DelayMs<u8>,
max_ms: u8
) -> Result<usize, Self::SensorError>
Auto Trait Implementations
impl<SPI, CSN, IN, RSTN> Send for SpiInterface<SPI, CSN, IN, RSTN> where
CSN: Send,
IN: Send,
RSTN: Send,
SPI: Send,
CSN: Send,
IN: Send,
RSTN: Send,
SPI: Send,
impl<SPI, CSN, IN, RSTN> Sync for SpiInterface<SPI, CSN, IN, RSTN> where
CSN: Sync,
IN: Sync,
RSTN: Sync,
SPI: Sync,
CSN: Sync,
IN: Sync,
RSTN: Sync,
SPI: Sync,
impl<SPI, CSN, IN, RSTN> Unpin for SpiInterface<SPI, CSN, IN, RSTN> where
CSN: Unpin,
IN: Unpin,
RSTN: Unpin,
SPI: Unpin,
CSN: Unpin,
IN: Unpin,
RSTN: Unpin,
SPI: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,