[−][src]Trait analog_multiplexer::Output
A trait so we can support both 8-channel and 16-channel
multiplexers simultaneously by merely instantiating them
with a 5 (16-channel) or 4 (8-channel) member tuple of
OutputPin
s.
Required methods
fn set_channel(&mut self, channel: u8)
fn enable(&mut self)
fn disable(&mut self)
fn num_channels(&self) -> u8
Implementors
impl<E, S0: OutputPin<Error = E>, S1: OutputPin<Error = E>, S2: OutputPin<Error = E>, EN: OutputPin<Error = E>> Output for (S0, S1, S2, EN)
[src]
A 4-pin implementation to support 8-channel multiplexers (e.g. 74HC4051)
fn set_channel(&mut self, channel: u8)
[src]
Sets the current active channel on the multiplexer (0-7)
fn enable(&mut self)
[src]
Brings the EN
pin low to enable the multiplexer
fn disable(&mut self)
[src]
Brings the EN
pin high to disable the multiplexer
fn num_channels(&self) -> u8
[src]
Returns the number of channels supported by this multiplexer (so you can easily iterate over them).
impl<E, S0: OutputPin<Error = E>, S1: OutputPin<Error = E>, S2: OutputPin<Error = E>, S3: OutputPin<Error = E>, EN: OutputPin<Error = E>> Output for (S0, S1, S2, S3, EN)
[src]
A 5-pin implementation to support 16-channel multiplexers (e.g. 74HC4067)
fn set_channel(&mut self, channel: u8)
[src]
Sets the current active channel on the multiplexer (0-15)
fn enable(&mut self)
[src]
Brings the EN
pin low to enable the multiplexer
fn disable(&mut self)
[src]
Brings the EN
pin high to disable the multiplexer
fn num_channels(&self) -> u8
[src]
Returns the number of channels supported by this multiplexer (so you can easily iterate over them).