raspberrypi / utils

A collection of scripts and simple applications
BSD 3-Clause "New" or "Revised" License
134 stars 41 forks source link

pinctrl: Add "level" mode #83

Closed pelwell closed 1 month ago

pelwell commented 1 month ago

"level" mode is a variation on "get" mode that produces compact output, normally a 0 or 1 for each GPIO. If given a range of GPIOs, the results are concatenated into a single line, separated by spaces for easy parsing. In addition to 1s and 0s, - indicates a pin that does not have input enabled at all.

In pin mode ("-p"), the none GPIO pins get additional symbols: 3, 5, 8, G, and '?' indicate 3.3V, 5V, 1,8V, GND and "other". GPIO numbers that are completely invalid are skipped, as they are in other modes.

See: https://github.com/raspberrypi/utils/issues/82