pub struct SpiDeviceAsync<I, C>where
I: SpiDevice,
C: CodecAsync,{
pub interface: I,
/* private fields */
}
Expand description
This represents an SPI device on an SPI bus.
Fields§
§interface: I
Spi interface
Implementations§
Source§impl<I, C> SpiDeviceAsync<I, C>where
I: SpiDevice,
C: CodecAsync,
impl<I, C> SpiDeviceAsync<I, C>where
I: SpiDevice,
C: CodecAsync,
Trait Implementations§
Source§impl<I, C> RegisterInterfaceAsync for SpiDeviceAsync<I, C>where
I: SpiDevice,
C: CodecAsync,
impl<I, C> RegisterInterfaceAsync for SpiDeviceAsync<I, C>where
I: SpiDevice,
C: CodecAsync,
Source§async fn read_register<R>(&mut self) -> Result<R, I::Error>where
R: ReadableRegister,
async fn read_register<R>(&mut self) -> Result<R, I::Error>where
R: ReadableRegister,
Read this register from this spi device using the codec specified by the register (if any) or otherwise the default codec of the device.
Source§async fn write_register<R>(
&mut self,
register: impl AsRef<R>,
) -> Result<(), I::Error>where
R: WritableRegister,
async fn write_register<R>(
&mut self,
register: impl AsRef<R>,
) -> Result<(), I::Error>where
R: WritableRegister,
Write this register to this spi device using the codec specified by the register (if any) or otherwise the default codec of the device.
type Error = <I as ErrorType>::Error
Auto Trait Implementations§
impl<I, C> Freeze for SpiDeviceAsync<I, C>where
I: Freeze,
impl<I, C> RefUnwindSafe for SpiDeviceAsync<I, C>where
I: RefUnwindSafe,
C: RefUnwindSafe,
impl<I, C> Send for SpiDeviceAsync<I, C>
impl<I, C> Sync for SpiDeviceAsync<I, C>
impl<I, C> Unpin for SpiDeviceAsync<I, C>
impl<I, C> UnwindSafe for SpiDeviceAsync<I, C>where
I: UnwindSafe,
C: 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