Commit 8524a3a
committed
add support for in/out GPIO pins on ULX3S
The ULX3S has 2x28 IO pins that can be used either individually or as
differential pairs. Currently we're going to assume an individual setup (you can
configure their behaviour in the .lpf file).
The convention is to see them as gp[27] (GPIO positive) and gn[28] (GPIO
negative) arrays. This is how they're numbered on the board itself. To work with
this convention, we split out the GPIO address space into 0x00XX and 0x02XX for
setting in/output values of gp and gn pins respectively, and use 0x01XX and
0x3XX for setting the direction of the gn and gp pins.
We define pinModeGp and pinModeGn to set the pin direction. pinMode becomes an
alias for pinModeGn.1 parent 9a92f21 commit 8524a3a
2 files changed
Lines changed: 75 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
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 | + | |
25 | 56 | | |
26 | | - | |
| 57 | + | |
27 | 58 | | |
28 | 59 | | |
29 | 60 | | |
30 | 61 | | |
31 | 62 | | |
32 | 63 | | |
33 | 64 | | |
34 | | - | |
35 | 65 | | |
36 | 66 | | |
37 | 67 | | |
38 | | - | |
39 | 68 | | |
40 | | - | |
| 69 | + | |
41 | 70 | | |
42 | 71 | | |
43 | 72 | | |
| |||
53 | 82 | | |
54 | 83 | | |
55 | 84 | | |
56 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| |||
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
114 | 128 | | |
115 | 129 | | |
116 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
117 | 134 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 135 | + | |
121 | 136 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
126 | 140 | | |
127 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
128 | 147 | | |
129 | 148 | | |
130 | 149 | | |
131 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
132 | 156 | | |
| 157 | + | |
133 | 158 | | |
134 | 159 | | |
135 | 160 | | |
136 | 161 | | |
137 | 162 | | |
138 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
139 | 172 | | |
140 | 173 | | |
141 | 174 | | |
| |||
0 commit comments