forked from hybridgroup/gobot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
black_pins.go
71 lines (66 loc) · 1.72 KB
/
black_pins.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
package beaglebone
var bbbPinMap = map[string]int{
// P8_01 - P8_2 GND
// P8_03 - P8_6 EMCC
"P8_07": 66,
"P8_08": 67,
"P8_09": 69,
"P8_10": 68,
"P8_11": 45,
"P8_12": 44,
"P8_13": 23,
"P8_14": 26,
"P8_15": 47,
"P8_16": 46,
"P8_17": 27,
"P8_18": 65,
"P8_19": 22,
// P8_20 - P8_25 EMCC
"P8_26": 61,
// P8_27 - P8_46 HDMI
// P9_1 - P9_2 GND
// P9_3 - P9_4 3V3
// P9_5 - P9_6 5V
// P9_7 - P9_8 5V SYS
// P9_9 PWR_BUT
// P9_10 SYS_RESET
"P9_11": 30,
"P9_12": 60,
"P9_13": 31,
"P9_14": 50,
"P9_15": 48,
"P9_16": 51,
"P9_17": 5,
"P9_18": 4,
// P9_19 I2C2 SCL
// P9_20 I2C2 SDA
"P9_21": 3,
"P9_22": 2,
"P9_23": 49,
"P9_24": 15,
"P9_25": 117,
"P9_26": 14,
"P9_27": 115,
"P9_28": 113,
"P9_29": 111,
"P9_30": 112,
"P9_31": 110,
}
var bbbPwmPinMap = map[string]pwmPinData{
"P8_13": {path: "/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip*", channel: 1},
"P8_19": {path: "/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip*", channel: 0},
"P9_14": {path: "/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip*", channel: 0},
"P9_16": {path: "/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip*", channel: 1},
"P9_21": {path: "/sys/devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip*", channel: 1},
"P9_22": {path: "/sys/devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip*", channel: 0},
"P9_42": {path: "/sys/devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip*", channel: 0},
}
var bbbAnalogPinMap = map[string]string{
"P9_39": "in_voltage0_raw",
"P9_40": "in_voltage1_raw",
"P9_37": "in_voltage2_raw",
"P9_38": "in_voltage3_raw",
"P9_33": "in_voltage4_raw",
"P9_36": "in_voltage5_raw",
"P9_35": "in_voltage6_raw",
}