Peripherals

Struct Peripherals 

Source
pub struct Peripherals<TSci, TSdi, TDreq, TRst> {
    pub sci: TSci,
    pub sdi: TSdi,
    pub dreq: TDreq,
    pub xrst: TRst,
}
Expand description

Contains all peripherals required to interface with VS1003

Fields§

§sci: TSci

The SCI SPI slave. Typically that will be the same SPI bus as SDI, with different CS (xCS).

§sdi: TSdi

The SDI SPI Slave. Typically that will be the same SPI bus as SCI, with different CS (xDCS).

§dreq: TDreq

The DREQ input pin.

§xrst: TRst

The xRST output pin.

Trait Implementations§

Source§

impl<TSci: Debug, TSdi: Debug, TDreq: Debug, TRst: Debug> Debug for Peripherals<TSci, TSdi, TDreq, TRst>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<TSci, TSdi, TDreq, TRst> Vs1003Peripherals for Peripherals<TSci, TSdi, TDreq, TRst>
where TSci: SpiDevice, TSdi: SpiDevice, TDreq: InputPin, TRst: OutputPin,

Source§

type TSci = TSci

The type of the command interface SPI slave
Source§

type TSdi = TSdi

The type of the data interface SPI slave
Source§

type TDreq = TDreq

The type of the DREQ input pin
Source§

type TRst = TRst

Tyhe type of the xRST output pin
Source§

type Error = Error<<TSci as ErrorType>::Error, <TSdi as ErrorType>::Error, <TDreq as ErrorType>::Error, <TRst as ErrorType>::Error>

The error type that will be returned by the driver
Source§

fn take(self) -> Self

Return the peripheral instances

Auto Trait Implementations§

§

impl<TSci, TSdi, TDreq, TRst> Freeze for Peripherals<TSci, TSdi, TDreq, TRst>
where TSci: Freeze, TSdi: Freeze, TDreq: Freeze, TRst: Freeze,

§

impl<TSci, TSdi, TDreq, TRst> RefUnwindSafe for Peripherals<TSci, TSdi, TDreq, TRst>
where TSci: RefUnwindSafe, TSdi: RefUnwindSafe, TDreq: RefUnwindSafe, TRst: RefUnwindSafe,

§

impl<TSci, TSdi, TDreq, TRst> Send for Peripherals<TSci, TSdi, TDreq, TRst>
where TSci: Send, TSdi: Send, TDreq: Send, TRst: Send,

§

impl<TSci, TSdi, TDreq, TRst> Sync for Peripherals<TSci, TSdi, TDreq, TRst>
where TSci: Sync, TSdi: Sync, TDreq: Sync, TRst: Sync,

§

impl<TSci, TSdi, TDreq, TRst> Unpin for Peripherals<TSci, TSdi, TDreq, TRst>
where TSci: Unpin, TSdi: Unpin, TDreq: Unpin, TRst: Unpin,

§

impl<TSci, TSdi, TDreq, TRst> UnwindSafe for Peripherals<TSci, TSdi, TDreq, TRst>
where TSci: UnwindSafe, TSdi: UnwindSafe, TDreq: UnwindSafe, TRst: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.