zephyr::device

Module gpio

Source
Expand description

Most devices in Zephyr operate on a struct device. This provides untyped access to devices. We want to have stronger typing in the Zephyr interfaces, so most of these types will be wrapped in another structure. This wraps a Gpio device, and provides methods to most of the operations on gpios.

Safey: In general, even just using gpio pins is unsafe in Zephyr. The gpio drivers are used pervasively throughout Zephyr device drivers. As such, most of the calls in this module are unsafe.

Structsยง

  • A single instance of a zephyr device to manage a gpio controller. A gpio controller represents a set of gpio pins, that are generally operated on by the same hardware block.
  • A GpioPin represents a single pin on a gpio device.
  • Global instance to help make gpio in Rust slightly safer.