[−][src]Trait switch_hal::output::OutputSwitch
Represents a logical output switch, such as a LED "switch" or transitor
Associated Types
type Error
Required methods
fn on(&mut self) -> Result<(), Self::Error>
Turns the switch on
Examples
use switch_hal::output::{OutputSwitch, Switch, ActiveHigh}; let mut led = Switch::<_, ActiveHigh>::new(pin); led.on().ok();
fn off(&mut self) -> Result<(), Self::Error>
Turns the switch off
Examples
use switch_hal::output::{OutputSwitch, Switch, ActiveHigh}; let mut led = Switch::<_, ActiveHigh>::new(pin); led.off().ok();