Merge branch 'master' of https://github.com/szmoore/MCTX3420.git
[matches/MCTX3420.git] / server / bbb_pin_defines.h
1 /**
2  * @file bbb_pin_defines.h
3  * @brief Defines pins on Beaglebone Black
4  */
5
6 #ifndef _BBB_PIN_DEFINES_H
7 #define _BBB_PIN_DEFINES_H
8
9 /** GPIO0 defines **/
10
11 #define GPIO0_1 1
12 #define GPIO0_2 2
13 //#define GPIO0_3 3 // Used for PWM
14 //#define GPIO0_4 4 // Used for PWM
15 #define GPIO0_5 5
16 #define GPIO0_6 6
17 #define GPIO0_7 7
18 #define GPIO0_8 8
19 #define GPIO0_9 9
20 #define GPIO0_10 10
21 #define GPIO0_11 11
22 #define GPIO0_12 12
23 #define GPIO0_13 13
24 #define GPIO0_14 14
25 #define GPIO0_15 15
26 #define GPIO0_16 16
27 #define GPIO0_17 17
28 #define GPIO0_18 18
29 #define GPIO0_19 19
30 #define GPIO0_20 20
31 #define GPIO0_21 21
32 #define GPIO0_22 22
33 #define GPIO0_23 23
34 #define GPIO0_24 24
35 #define GPIO0_25 25
36 #define GPIO0_26 26
37 #define GPIO0_27 27
38 #define GPIO0_28 28
39 #define GPIO0_29 29
40 #define GPIO0_30 30
41 #define GPIO0_31 31
42 #define GPIO0_32 32
43
44 /** GPIO1 defines **/
45
46 #define GPIO1_1 33
47 #define GPIO1_2 34
48 #define GPIO1_3 35
49 #define GPIO1_4 36
50 #define GPIO1_5 37
51 #define GPIO1_6 38
52 #define GPIO1_7 39
53 #define GPIO1_8 40
54 #define GPIO1_9 41
55 #define GPIO1_10 42
56 #define GPIO1_11 43
57 #define GPIO1_12 44
58 #define GPIO1_13 45
59 #define GPIO1_14 46
60 #define GPIO1_15 47
61 #define GPIO1_16 48
62 #define GPIO1_17 49
63 #define GPIO1_18 50
64 #define GPIO1_19 51
65 #define GPIO1_20 52
66 #define GPIO1_21 53
67 #define GPIO1_22 54
68 #define GPIO1_23 55
69 #define GPIO1_24 56
70 #define GPIO1_25 57
71 #define GPIO1_26 58
72 #define GPIO1_27 59
73 #define GPIO1_28 60
74 #define GPIO1_29 61
75 #define GPIO1_30 62
76 #define GPIO1_31 63
77 #define GPIO1_32 64
78
79 /** GPIO2 defines **/
80
81 #define GPIO2_1 65
82 #define GPIO2_2 66
83 #define GPIO2_3 67
84 #define GPIO2_4 68
85 #define GPIO2_5 69
86 #define GPIO2_6 70
87 #define GPIO2_7 71
88 #define GPIO2_8 72
89 #define GPIO2_9 73
90 #define GPIO2_10 74
91 #define GPIO2_11 75
92 #define GPIO2_12 76
93 #define GPIO2_13 77
94 #define GPIO2_14 78
95 #define GPIO2_15 79
96 #define GPIO2_16 80
97 #define GPIO2_17 81
98 #define GPIO2_18 82
99 #define GPIO2_19 83
100 #define GPIO2_20 84
101 #define GPIO2_21 85
102 #define GPIO2_22 86
103 #define GPIO2_23 87
104 #define GPIO2_24 88
105 #define GPIO2_25 89
106 #define GPIO2_26 90
107 #define GPIO2_27 91
108 #define GPIO2_28 92
109 #define GPIO2_29 93
110 #define GPIO2_30 94
111 #define GPIO2_31 95
112 #define GPIO2_32 96
113
114 /** Number of GPIO pins **/
115 #define GPIO_NUM_PINS 97
116
117 /** Export path **/
118 #define GPIO_DEVICE_PATH "/sys/class/gpio"
119
120 #define ADC_BITS 12
121 #define ADC_DIGITS 5
122 #define ADC0 0
123 #define ADC1 1
124 #define ADC2 2
125 #define ADC3 3
126 #define ADC4 4
127 #define ADC5 5
128 #define ADC6 6
129 #define ADC7 7
130
131 /** Number of ADC pins **/
132 #define ADC_NUM_PINS 8
133
134 /** Path to export ADCs with**/
135 #define ADC_EXPORT_PATH "/sys/devices/bone_capemgr.9/slots"
136 /** Path at which ADCs appear **/
137 #define ADC_DEVICE_PATH "/sys/devices/ocp.3/helper.16"
138
139 /** PWM defines **/
140 #define EHRPWM0A 0
141 #define EHRPWM0B 1
142 // No other PWM pins work!
143
144 /** Number of PWM pins **/
145 #define PWM_NUM_PINS 2
146
147 /** Path to PWM sysfs **/
148 #define PWM_DEVICE_PATH "/sys/class/pwm"
149
150
151
152 #endif //_BBB_PIN_DEFINES_H
153
154

UCC git Repository :: git.ucc.asn.au