raspberry:raspberry-gpio
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| raspberry:raspberry-gpio [2024/04/23 15:34] – oscar | raspberry:raspberry-gpio [2024/04/23 16:03] (current) – oscar | ||
|---|---|---|---|
| Line 68: | Line 68: | ||
| You can install the libraries and tools to interact with this device, using sudo apt install gpiod. This will install the gpiod tools, and the libgpiod2 library to let you interact with the device from your own code. | You can install the libraries and tools to interact with this device, using sudo apt install gpiod. This will install the gpiod tools, and the libgpiod2 library to let you interact with the device from your own code. | ||
| < | < | ||
| - | apt install gpiod --> runtime | + | # apt install gpiod --> runtime |
| - | apt install libgpiod2 | + | # apt install libgpiod2 |
| </ | </ | ||
| + | |||
| + | |||
| + | * **gpiodetect** – list all gpiochips present on the system, their names, labels and number of GPIO lines | ||
| + | * **gpioinfo** – list all lines of specified gpiochips, their names, consumers, direction, active state and additional flags | ||
| + | * **gpioget** – read values of specified GPIO lines | ||
| + | * **gpioset** – set values of specified GPIO lines, potentially keep the lines exported and wait until timeout, user input or signal | ||
| + | * **gpiofind** – find the gpiochip name and line offset given the line name | ||
| + | * **gpiomon** – wait for events on GPIO lines, specify which events to watch, how many events to process before exiting or if the events should be reported to the console | ||
| + | |||
| + | ==== gpiodetect ==== | ||
| + | The first column represents name of the chip (also the device node name). The second column (in square brackets) is the device label which is normally set by the GPIO driver (this will match the value of / | ||
| + | < | ||
| + | # gpiodetect | ||
| + | ------------ | ||
| + | gpiochip0 [pinctrl-bcm2835] (54 lines) | ||
| + | gpiochip1 [ftdi-cbus] (4 lines) | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | # gpioinfo | ||
| + | ---------- | ||
| + | gpiochip0 - 54 lines: | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | line 10: " | ||
| + | line 11: " | ||
| + | line 12: " | ||
| + | line 13: " | ||
| + | line 14: " | ||
| + | line 15: " | ||
| + | line 16: " | ||
| + | line 17: " | ||
| + | line 18: " | ||
| + | line 19: " | ||
| + | line 20: " | ||
| + | line 21: " | ||
| + | line 22: " | ||
| + | line 23: " | ||
| + | line 24: " | ||
| + | line 25: " | ||
| + | line 26: " | ||
| + | line 27: " | ||
| + | line 28: " | ||
| + | line 29: " | ||
| + | line 30: " | ||
| + | line 31: " | ||
| + | line 32: " | ||
| + | line 33: " | ||
| + | line 34: " | ||
| + | line 35: " | ||
| + | line 36: " | ||
| + | line 37: " | ||
| + | line 38: " | ||
| + | line 39: " | ||
| + | line 40: " | ||
| + | line 41: " | ||
| + | line 42: " | ||
| + | line 43: " | ||
| + | line 44: " | ||
| + | line 45: " | ||
| + | line 46: " | ||
| + | line 47: " | ||
| + | line 48: " | ||
| + | line 49: " | ||
| + | line 50: " | ||
| + | line 51: " | ||
| + | line 52: " | ||
| + | line 53: " | ||
| + | gpiochip1 - 4 lines: | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | line | ||
| + | </ | ||
| + | ===== Links ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
raspberry/raspberry-gpio.1713886466.txt.gz · Last modified: by oscar
