Skip to main content

Module gpio

Module gpio 

Expand description

GPIO HAL plus per-line edge-callback demuxer. Kernel drivers use register_edge_handler and the IRQ slot from irq_slot_for_line.

Structs§

Edges
Pin

Enums§

Level
Pull

Functions§

configure_input
configure_output
configure_output_od
dispatch
IRQ-context demuxer; register once per used IRQ slot. Only services lines belonging to vector.
enable_port_clock
Ungate the port’s clock without touching mode/pull — needed before read_odr on a still-analog pin.
irq_slot_for_line
IRQ slot that fires for line, or None for lines outside 0..15. const so callers can validate DT-derived lines at compile time.
read
read_odr
Read ODR (latched output bit). Use instead of read on a pin that may still be in analog mode — IDR is forced to 0 there (RM0432 §8.3.12). Clock must be ungated.
register_edge_handler
Install an edge handler for pin and unmask the line. EBUSY if the line is already claimed — call unregister_edge_handler first. The caller registers dispatch at the matching irq_slot_for_line (once per slot).
toggle
unregister_edge_handler
write

Type Aliases§

EdgeHandler
IRQ-context callback. No allocation, no blocking.