eensy/gpio

Types

pub type Direction {
  Input
  Output
  OutputOd
}

Constructors

  • Input
  • Output
  • OutputOd
pub type Level {
  Low
  High
}

Constructors

  • Low
  • High

Functions

pub fn digital_write(pin: Int, level: Level) -> Result(Int, Nil)

Write to gpio pin

pub fn set_pin_mode(
  pin: Int,
  direction: Direction,
) -> Result(Int, Nil)

Set gpio pin direction

pub fn start() -> Result(Int, Nil)

Start gpio

Search Document