Struct Generic16BitBus

Source
pub struct Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> { /* private fields */ }
Expand description

A generic implementation of OutputBus using OutputPins

Implementations§

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>
where P0: OutputPin, P1: OutputPin, P2: OutputPin, P3: OutputPin, P4: OutputPin, P5: OutputPin, P6: OutputPin, P7: OutputPin, P8: OutputPin, P9: OutputPin, P10: OutputPin, P11: OutputPin, P12: OutputPin, P13: OutputPin, P14: OutputPin, P15: OutputPin,

Source

pub fn new( pins: (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15), ) -> Self

Creates a new bus. This does not change the state of the pins.

The first pin in the tuple is the least significant bit.

Source

pub fn release( self, ) -> (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)

Consumes the bus and returns the pins. This does not change the state of the pins.

Trait Implementations§

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> From<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)> for Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>
where P0: OutputPin, P1: OutputPin, P2: OutputPin, P3: OutputPin, P4: OutputPin, P5: OutputPin, P6: OutputPin, P7: OutputPin, P8: OutputPin, P9: OutputPin, P10: OutputPin, P11: OutputPin, P12: OutputPin, P13: OutputPin, P14: OutputPin, P15: OutputPin,

Source§

fn from( pins: (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15), ) -> Self

Converts to this type from the input type.
Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, E> OutputBus for Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>
where P0: OutputPin<Error = E>, P1: OutputPin<Error = E>, P2: OutputPin<Error = E>, P3: OutputPin<Error = E>, P4: OutputPin<Error = E>, P5: OutputPin<Error = E>, P6: OutputPin<Error = E>, P7: OutputPin<Error = E>, P8: OutputPin<Error = E>, P9: OutputPin<Error = E>, P10: OutputPin<Error = E>, P11: OutputPin<Error = E>, P12: OutputPin<Error = E>, P13: OutputPin<Error = E>, P14: OutputPin<Error = E>, P15: OutputPin<Error = E>, E: Debug,

Source§

const KIND: InterfaceKind = InterfaceKind::Parallel16Bit

Interface kind.
Source§

type Word = u16

u8 for 8-bit buses, u16 for 16-bit buses, etc.
Source§

type Error = E

Error type
Source§

fn set_value(&mut self, value: Self::Word) -> Result<(), Self::Error>

Set the output bus to a specific value

Auto Trait Implementations§

§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> Freeze for Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>
where P0: Freeze, P1: Freeze, P2: Freeze, P3: Freeze, P4: Freeze, P5: Freeze, P6: Freeze, P7: Freeze, P8: Freeze, P9: Freeze, P10: Freeze, P11: Freeze, P12: Freeze, P13: Freeze, P14: Freeze, P15: Freeze,

§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> RefUnwindSafe for Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>

§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> Send for Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>
where P0: Send, P1: Send, P2: Send, P3: Send, P4: Send, P5: Send, P6: Send, P7: Send, P8: Send, P9: Send, P10: Send, P11: Send, P12: Send, P13: Send, P14: Send, P15: Send,

§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> Sync for Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>
where P0: Sync, P1: Sync, P2: Sync, P3: Sync, P4: Sync, P5: Sync, P6: Sync, P7: Sync, P8: Sync, P9: Sync, P10: Sync, P11: Sync, P12: Sync, P13: Sync, P14: Sync, P15: Sync,

§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> Unpin for Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>
where P0: Unpin, P1: Unpin, P2: Unpin, P3: Unpin, P4: Unpin, P5: Unpin, P6: Unpin, P7: Unpin, P8: Unpin, P9: Unpin, P10: Unpin, P11: Unpin, P12: Unpin, P13: Unpin, P14: Unpin, P15: Unpin,

§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> UnwindSafe for Generic16BitBus<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15>
where P0: UnwindSafe, P1: UnwindSafe, P2: UnwindSafe, P3: UnwindSafe, P4: UnwindSafe, P5: UnwindSafe, P6: UnwindSafe, P7: UnwindSafe, P8: UnwindSafe, P9: UnwindSafe, P10: UnwindSafe, P11: UnwindSafe, P12: UnwindSafe, P13: UnwindSafe, P14: UnwindSafe, P15: 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> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
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.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.