Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit a502995a authored by Matthijs van Duin's avatar Matthijs van Duin
Browse files

Merge branch 'master' into green-wireless

parents 4017f300 d51ed53e
No related merge requests found
......@@ -68,7 +68,15 @@ Which mux option is selected for the pin (0-7) and a short description thereof.
![](/doc/images/gpio.png)
If a pin is muxed as gpio and the gpio functionality has been requested in the kernel (e.g. the gpio is exported via sysfs), then the direction and level is shown. Arrow to the right ("hi >>") means output, arrow to the left ("<< hi") means input.
If a pin is muxed as gpio and this gpio is "in use" (by a kernel driver or exported to userspace), then the current state of the gpio is shown:
- `lo >>` output, driven low
- `hi >>` output, driven high
- `<< lo` input, detected low
- `<< hi` input, detected high
- `<! ` input, level unknown because receiver is disabled
If the kernel considers the gpio to be unused then information about its state is unavailable and the gpio will be grayed out.
### Usage
......
......@@ -119,7 +119,8 @@ while( <> ) {
/\G (0|[1-9]\d*) /gc or die "parse error";
my $pin = 0 + $1;
/\G(?|\(PIN$pin\) ([0-9a-f]{8})(?:\.0)?|\(([0-9a-f]{8})(?:\.0)?\)) /gc
/\G\(PIN$pin\) (?:\d+:\S+ )?([0-9a-f]{8})(?:\.0)? /gc
or /\G\(([0-9a-f]{8})(?:\.0)?\) /gc
or die "parse error";
hex $1 == 0x44e10800 + 4 * $pin or die "sanity check failed";
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment