[][src]Struct mynewt::SPI

pub struct SPI { /* fields omitted */ }

Rust Embedded HAL interface for Mynewt SPI

Implementations

impl SPI[src]

Rust Embedded HAL interface for Mynewt SPI

pub fn new() -> Self[src]

Create a new SPI port

pub fn init(
    &mut self,
    spi_num: i32,
    cs_pin: i32,
    spi_settings: *mut hal_spi_settings
) -> MynewtResult<()>
[src]

Initiaise the SPI port

Trait Implementations

impl Write<u8> for SPI[src]

Rust Embedded HAL interface for Mynewt SPI

fn write(&mut self, words: &[u8]) -> Result<(), Self::Error>[src]

Write to the SPI port

type Error = MynewtError

Reuse Mynewt error codes

Auto Trait Implementations

impl Send for SPI

impl Sync for SPI

impl Unpin for SPI

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<W, S> Write<W> for S where
    S: Default<W>,
    W: Clone
[src]

type Error = <S as FullDuplex<W>>::Error

Error type