GPIO

From Clockwork GameShell
Revision as of 06:06, 8 January 2022 by HenryHu (talk | contribs) (→‎A04: Add description for GPIO 41 (fan))
Jump to navigation Jump to search

GPIO

A04

Raw output from `gpio readall`:

+-----+------+------+------+---+-----+------+------+------+---+
| BCM | GPIO | Name | Mode | V | BCM | GPIO | Name | Mode | V |
+-----+------+------+------+---+-----+------+------+------+---+
|   0 |   58 | PD26 | ALT2 | 0 |  23 |  129 | PG1  | ALT2 | 0 |
|   1 |   57 | PD25 | ALT2 | 0 |  24 |  130 | PG2  | ALT2 | 0 |
|   2 |  167 | PH7  | ALT6 | 1 |  25 |  131 | PG3  | ALT2 | 0 |
|   3 |    0 | PC0  |  OUT | 1 |  26 |  132 | PG4  | ALT2 | 0 |
|   4 |    1 | PC1  |  OFF | 0 |  27 |  133 | PG5  | ALT2 | 0 |
|   5 |    2 | PC2  |  OUT | 1 |  28 |    9 | PC9  |  OUT | 0 |
|   6 |    3 | PC3  |   IN | 1 |  29 |  201 | PL9  |  OUT | 0 |
|   7 |    4 | PC4  |  OUT | 1 |  30 |  196 | PL4  |  OUT | 0 |
|   8 |    5 | PC5  |  OUT | 0 |  31 |  199 | PL7  |  OUT | 0 |
|   9 |    6 | PC6  |  OUT | 1 |  32 |  161 | PH1  | ALT2 | 0 |
|  10 |    7 | PC7  |   IN | 0 |  33 |  160 | PH0  | ALT2 | 0 |
|  11 |    8 | PC8  |  OUT | 1 |  34 |  227 | PM3  |   IN | 1 |
|  12 |   15 | PC15 |  OFF | 0 |  35 |  198 | PL6  |   IN | 1 |
|  13 |   54 | PD22 |  OFF | 0 |  36 |  163 | PH3  |  OUT | 1 |
|  14 |  134 | PG6  | ALT2 | 0 |  37 |  166 | PH6  |  OUT | 0 |
|  15 |  135 | PG7  | ALT2 | 0 |  38 |  165 | PH5  | ALT2 | 0 |
|  16 |  137 | PG9  | ALT2 | 0 |  39 |  164 | PH4  | ALT2 | 0 |
|  17 |  136 | PG8  | ALT2 | 0 |  40 |  228 | PM4  |  OUT | 0 |
|  18 |  139 | PG11 |  OFF | 0 |  41 |  224 | PM0  |  OUT | 0 |
|  19 |  138 | PG10 |  OFF | 0 |  42 |  225 | PM1  |  OFF | 0 |
|  20 |  141 | PG13 |  OFF | 0 |  43 |  226 | PM2  |  OFF | 0 |
|  21 |  140 | PG12 |  OFF | 0 |  44 |   56 | PD24 | ALT2 | 0 |
|  22 |  128 | PG0  | ALT2 | 0 |  45 |   55 | PD23 | ALT2 | 0 |
+-----+------+------+------+---+-----+------+------+------+---+
| BCM | GPIO | Name | Mode | V | BCM | GPIO | Name | Mode | V |
+-----+------+------+------+---+-----+------+------+------+---+
# GPIO Name Mode Value Description
0 58 PD26 ALT2 0
1 57 PD25 ALT2 0
2 167 PH7 ALT6 1
3 0 PC0 OUT 1
4 1 PC1 OFF 0
5 2 PC2 OUT 1
6 3 PC3 IN 1
7 4 PC4 OUT 1
8 5 PC5 OUT 0
9 6 PC6 OUT 1
10 7 PC7 IN 0 1 if headphone is plugged in, 0 if not
11 8 PC8 OUT 1 write 1 to enable speaker, 0 to disable
12 15 PC15 OFF 0
13 54 PD22 OFF 0
14 134 PG6 ALT2 0
15 135 PG7 ALT2 0
16 137 PG9 ALT2 0
17 136 PG8 ALT2 0
18 139 PG11 OFF 0
19 138 PG10 OFF 0
20 141 PG13 OFF 0
21 140 PG12 OFF 0
22 128 PG0 ALT2 0
23 129 PG1 ALT2 0
24 130 PG2 ALT2 0
25 131 PG3 ALT2 0
26 132 PG4 ALT2 0
27 133 PG5 ALT2 0
28 9 PC9 OUT 0
29 201 PL9 OUT 0
30 196 PL4 OUT 0
31 199 PL7 OUT 0
32 161 PH1 ALT2 0
33 160 PH0 ALT2 0
34 227 PM3 IN 1
35 198 PL6 IN 1
36 163 PH3 OUT 1
37 166 PH6 OUT 0
38 165 PH5 ALT2 0
39 164 PH4 ALT2 0
40 228 PM4 OUT 0
41 224 PM0 OUT 0 write 1 to start fan, 0 to stop
42 225 PM1 OFF 0
43 226 PM2 OFF 0
44 56 PD24 ALT2 0
45 55 PD23 ALT2 0