Using Gpio

TODO: use template? provide more context

Converting ARM ball names to Linux gpio numbers

Note: Gpio bank is 1-based, there is no bank 0.

Formula: gpio<bank>_<offset> => (bank-1)*32 + offset = Linux gpio number

Ex: gpio1_0 => (1-1)*32 + 0 = 0
Ex: gpio7_6 => (7-1)*32 + 6 = 198

Listing gpios

This lists all exported or claimed gpios

cat /sys/kernel/debug/gpio

Controlling GPIOs

C++ gpio helper classes can be provided upon request.

Go to top
Add picture from clipboard (Maximum size: 1 GB)