Skip to main content

OutputBus

Trait OutputBus 

Source
pub trait OutputBus {
    type Word: Copy;
    type Error: Debug;

    const KIND: InterfaceKind;

    // Required method
    fn set_value(&mut self, value: Self::Word) -> Result<(), Self::Error>;
}
Expand description

This trait represents the data pins of a parallel bus.

See Generic8BitBus and Generic16BitBus for generic implementations.

Required Associated Constants§

Source

const KIND: InterfaceKind

Interface kind.

Required Associated Types§

Source

type Word: Copy

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

Source

type Error: Debug

Error type

Required Methods§

Source

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

Set the output bus to a specific value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, E> OutputBus for Generic8BitBus<P0, P1, P2, P3, P4, P5, P6, P7>
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>, E: Debug,

Source§

const KIND: InterfaceKind = InterfaceKind::Parallel8Bit

Source§

type Word = u8

Source§

type Error = E

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

Source§

type Word = u16

Source§

type Error = E