[−][src]Struct ads129xx::spi::SpiDevice
A SPI device also triggering the nCS-pin when suited.
Methods
impl<SPI, NCS, TIM, E, EO> SpiDevice<SPI, NCS, TIM> where
SPI: Write<u8, Error = E> + Transfer<u8, Error = E>,
NCS: OutputPin<Error = EO>,
TIM: CountDown,
[src]
SPI: Write<u8, Error = E> + Transfer<u8, Error = E>,
NCS: OutputPin<Error = EO>,
TIM: CountDown,
pub fn new(spi: SPI, ncs: NCS, timer: TIM) -> Result<Self, SpiError<E, EO>>
[src]
Create a new SPI device
pub fn transfer(&mut self, buffer: &mut [u8]) -> Result<(), SpiError<E, EO>>
[src]
Transfer the buffer to the device, the passed buffer will contain the read data.
pub fn write(&mut self, buffer: &[u8]) -> Result<(), SpiError<E, EO>>
[src]
Write a number of bytes to the device.
pub fn wait(&mut self, i: u16) -> Result<(), SpiError<E, EO>>
[src]
pub fn into_inner(self) -> (SPI, NCS, TIM)
[src]
Consume self and release inner resources.
Auto Trait Implementations
impl<SPI, NCS, TIM> Unpin for SpiDevice<SPI, NCS, TIM> where
NCS: Unpin,
SPI: Unpin,
TIM: Unpin,
NCS: Unpin,
SPI: Unpin,
TIM: Unpin,
impl<SPI, NCS, TIM> Send for SpiDevice<SPI, NCS, TIM> where
NCS: Send,
SPI: Send,
TIM: Send,
NCS: Send,
SPI: Send,
TIM: Send,
impl<SPI, NCS, TIM> Sync for SpiDevice<SPI, NCS, TIM> where
NCS: Sync,
SPI: Sync,
TIM: Sync,
NCS: Sync,
SPI: Sync,
TIM: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,