GPIO

General-purpose input/output (GPIO) is a generic pin on an integrated circuit or computer board whose behavior—including whether it is an input or output pin—is controllable by the user at run time. Wikipediaarrow-up-right

Hardware Perspective

One powerful feature of the Raspberry Pi is the row of GPIO (general purpose input/output) pins along the top edge of the board. Homepagearrow-up-right

The comprehensive GPIO Pinout guide for the Raspberry Pi. Pinout Homepagearrow-up-right

The Raspberry Pi offers up its GPIO over a standard male header on the board. Over the years the header has expanded from 26 pins to 40 pins while maintaining the original pinout. Sparkfun Raspberry gPIoarrow-up-right

One of the great things about the Raspberry Pi is that it has a GPIO connector to which you can attach external hardware. Adafruit GPIO Setuparrow-up-right

The Raspberry Pi GPIOs can be controlled using many programming languages. ELinux RPi GPIO Code Samplesarrow-up-right

Operating System Perspective

Kernel Ring Buffer

pi@raspberrypi:~ $ dmesg | grep -i gpio
[    0.080031] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    3.524055] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
pi@raspberrypi:~ $

SysFs

GPIO Sysfs Interface for Userspace. Platforms which use the "gpiolib" implementors framework may choose to configure a sysfs user interface to GPIOs. This is different from the debugfs interface, since it provides control over GPIO direction and value instead of just showing a gpio state summary. Plus, it could be present on production systems without debugging support.

Last updated