-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathraspi_pin_map.go
99 lines (97 loc) · 1.13 KB
/
raspi_pin_map.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package raspi
var pins = map[string]map[string]int{
"3": {
"1": 0,
"2": 2,
"3": 2,
},
"5": {
"1": 1,
"2": 3,
"3": 3,
},
"7": {
"*": 4,
},
"8": {
"*": 14,
},
"10": {
"*": 15,
},
"11": {
"*": 17,
},
"12": {
"*": 18,
},
"13": {
"1": 21,
"2": 27,
"3": 27,
},
"15": {
"*": 22,
},
"16": {
"*": 23,
},
"18": {
"*": 24,
},
"19": {
"*": 10,
},
"21": {
"*": 9,
},
"22": {
"*": 25,
},
"23": {
"*": 11,
},
"24": {
"*": 8,
},
"26": {
"*": 7,
},
"29": {
"3": 5,
},
"31": {
"3": 6,
},
"32": {
"3": 12,
},
"33": {
"3": 13,
},
"35": {
"3": 19,
},
"36": {
"3": 16,
},
"37": {
"3": 26,
},
"38": {
"3": 20,
},
"40": {
"3": 21,
},
"pwm0": { // pin 12 (GPIO18) and pin 32 (GPIO12) can be configured for "pwm0"
"*": 0,
},
"pwm1": { // pin 33 (GPIO13) and pin 35 (GPIO19) can be configured for "pwm1"
"3": 1,
},
}
var analogPinDefinitions = map[string]analogPinDefinition{
// +/-273.200 °C need >=7 characters to read: +/-273200 millidegree Celsius
"thermal_zone0": {path: "/sys/class/thermal/thermal_zone0/temp", r: true, w: false, bufLen: 7},
}