Trait endbasic_std::gpio::Pins [−][src]
Generic abstraction over a GPIO chip to back all EndBASIC commands.
Required methods
fn setup(&mut self, pin: Pin, mode: PinMode) -> Result<()>
[src]
Configures the pin
as either input or output (per mode
).
This lazily initialies the GPIO chip as well on the first pin setup.
It is OK to set up a pin multiple times without calling clear()
in-between.
fn clear(&mut self, pin: Pin) -> Result<()>
[src]
Resets a given pin
to its default state.
fn clear_all(&mut self) -> Result<()>
[src]
Resets all pins to their default state.
fn read(&mut self, pin: Pin) -> Result<bool>
[src]
Reads the value of the given pin
, which must have been previously setup as an input pin.
fn write(&mut self, pin: Pin, v: bool) -> Result<()>
[src]
Writes v
to the given pin
, which must have been previously setup as an output pin.