Struct embedded_hal_async::spi::ExclusiveDevice
source · pub struct ExclusiveDevice<BUS, CS> { /* private fields */ }
Expand description
Implementations
sourceimpl<BUS, CS> ExclusiveDevice<BUS, CS>
impl<BUS, CS> ExclusiveDevice<BUS, CS>
Trait Implementations
sourceimpl<BUS, CS> ErrorType for ExclusiveDevice<BUS, CS>where
BUS: ErrorType,
CS: OutputPin,
impl<BUS, CS> ErrorType for ExclusiveDevice<BUS, CS>where
BUS: ErrorType,
CS: OutputPin,
sourceimpl<BUS, CS> SpiDevice for ExclusiveDevice<BUS, CS>where
BUS: SpiBusFlush,
CS: OutputPin,
impl<BUS, CS> SpiDevice for ExclusiveDevice<BUS, CS>where
BUS: SpiBusFlush,
CS: OutputPin,
type Bus = BUS
type Bus = BUS
SPI Bus type for this device.
sourcefn transaction<R>(
&mut self,
f: impl FnOnce(&mut Self::Bus) -> Result<R, <Self::Bus as ErrorType>::Error>
) -> Result<R, Self::Error>
fn transaction<R>(
&mut self,
f: impl FnOnce(&mut Self::Bus) -> Result<R, <Self::Bus as ErrorType>::Error>
) -> Result<R, Self::Error>
Perform a transaction against the device. Read more
sourcefn write<Word>(&mut self, buf: &[Word]) -> Result<(), Self::Error>where
Self::Bus: SpiBusWrite<Word>,
Word: Copy,
fn write<Word>(&mut self, buf: &[Word]) -> Result<(), Self::Error>where
Self::Bus: SpiBusWrite<Word>,
Word: Copy,
Do a write within a transaction. Read more
sourcefn read<Word>(&mut self, buf: &mut [Word]) -> Result<(), Self::Error>where
Self::Bus: SpiBusRead<Word>,
Word: Copy,
fn read<Word>(&mut self, buf: &mut [Word]) -> Result<(), Self::Error>where
Self::Bus: SpiBusRead<Word>,
Word: Copy,
Do a read within a transaction. Read more
sourceimpl<BUS, CS> SpiDevice for ExclusiveDevice<BUS, CS>where
BUS: SpiBusFlush,
CS: OutputPin,
impl<BUS, CS> SpiDevice for ExclusiveDevice<BUS, CS>where
BUS: SpiBusFlush,
CS: OutputPin,
type Bus = BUS
type Bus = BUS
SPI Bus type for this device.
sourceasync fn transaction<R, F, Fut>(&mut self, f: F) -> Result<R, Self::Error>where
F: FnOnce(*mut Self::Bus) -> Fut,
Fut: Future<Output = Result<R, <Self::Bus as ErrorType>::Error>>,
async fn transaction<R, F, Fut>(&mut self, f: F) -> Result<R, Self::Error>where
F: FnOnce(*mut Self::Bus) -> Fut,
Fut: Future<Output = Result<R, <Self::Bus as ErrorType>::Error>>,
Perform a transaction against the device. Read more
sourceasync fn read<'a, Word>(
&'a mut self,
buf: &'a mut [Word]
) -> Result<(), Self::Error>where
Self::Bus: SpiBusRead<Word>,
Word: Copy + 'static,
async fn read<'a, Word>(
&'a mut self,
buf: &'a mut [Word]
) -> Result<(), Self::Error>where
Self::Bus: SpiBusRead<Word>,
Word: Copy + 'static,
Do a read within a transaction. Read more
sourceasync fn write<'a, Word>(
&'a mut self,
buf: &'a [Word]
) -> Result<(), Self::Error>where
Self::Bus: SpiBusWrite<Word>,
Word: Copy + 'static,
async fn write<'a, Word>(
&'a mut self,
buf: &'a [Word]
) -> Result<(), Self::Error>where
Self::Bus: SpiBusWrite<Word>,
Word: Copy + 'static,
Do a write within a transaction. Read more
Auto Trait Implementations
impl<BUS, CS> RefUnwindSafe for ExclusiveDevice<BUS, CS>where
BUS: RefUnwindSafe,
CS: RefUnwindSafe,
impl<BUS, CS> Send for ExclusiveDevice<BUS, CS>where
BUS: Send,
CS: Send,
impl<BUS, CS> Sync for ExclusiveDevice<BUS, CS>where
BUS: Sync,
CS: Sync,
impl<BUS, CS> Unpin for ExclusiveDevice<BUS, CS>where
BUS: Unpin,
CS: Unpin,
impl<BUS, CS> UnwindSafe for ExclusiveDevice<BUS, CS>where
BUS: UnwindSafe,
CS: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more