Skip to main content

Module gpio

Module gpio 

Source
Expand description

GPIO control for oveRTOS.

Provides pin configuration, digital read/write, and interrupt registration. Pins are identified by a GpioPin which bundles the port and pin number, preventing accidental argument swaps.

Structs§

GpioPin
A GPIO pin identified by port and pin number.
InputPin
Fixed-mode input GPIO pin.
OutputPin
Fixed-mode output GPIO pin.

Enums§

GpioIrqMode
GPIO interrupt trigger mode.
GpioMode
GPIO pin direction/pull mode.

Functions§

configure
Configure a GPIO pin’s direction and pull mode.
get
Read a GPIO pin input value. Returns the pin level (0 or 1) on success.
irq_disable
Disable a registered GPIO interrupt without removing the registration.
irq_enable
Enable a previously registered GPIO interrupt.
irq_register
Register a GPIO interrupt callback.
set
Set a GPIO pin’s output level (value: 0 = low, non-zero = high).