projects
/
linux-gpio-pinout
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
854b485
)
strip leading zero from raspi-gpio pin numbers
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 6 Jun 2018 09:19:57 +0000
(11:19 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 6 Jun 2018 09:19:57 +0000
(11:19 +0200)
gpio.pl
patch
|
blob
|
history
diff --git
a/gpio.pl
b/gpio.pl
index
0e75092
..
99e1703
100755
(executable)
--- a/
gpio.pl
+++ b/
gpio.pl
@@
-232,7
+232,7
@@
open(my $pio, '-|', 'raspi-gpio get');
while(<$pio>) {
chomp;
if ( m/^\s*GPIO (\d+): (.+)/ ) {
- my $pin = 'gpio' . $1
;
+ my $pin = 'gpio' . $1
* 1; # we need * 1 to strip leading zero
push @gpio_pins, $1;
annotate_pin $pin, $2 if ! $opt_svg;
}