The gpio component provides Raspberry Pi GPIO header and pin information.
It provides mappings between physical Raspberry Pi header pin numbers and BCM GPIO numbers.
The GpioPin class describes a single Raspberry Pi header pin.
Each pin contains:
The RpiGpioHeader class provides the Raspberry Pi 40-pin GPIO header mapping.
Pins can be looked up using either a physical header pin number or BCM GPIO number.
Example output:
BCM and physical pin numbers can also be converted directly:
A simple CLI application is provided in the component_test directory.
Run the test from the project root:
The component test displays the Raspberry Pi GPIO header pin mapping.
This component describes the Raspberry Pi GPIO header and pin mappings.
It does not configure, read, or write GPIO pins. Hardware-specific GPIO operations should be handled by separate GPIO components.