grblHAL core  20241107
stepdir_map.h
Go to the documentation of this file.
1 /*
2  stepdir_map.h - An embedded CNC Controller with rs274/ngc (g-code) support
3 
4  Lookup tables for converting core step and dir signals to physical signals, includes signal inversion.
5 
6  May be used by driver code if step and/or dir pins are located to the same port.
7 
8  NOT referenced in the core grbl code
9 
10  Part of grblHAL
11 
12  Copyright (c) 2021-2022 Terje Io
13 
14  Grbl is free software: you can redistribute it and/or modify
15  it under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  Grbl is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with Grbl. If not, see <http://www.gnu.org/licenses/>.
26 */
27 
28 #if STEP_OUTMODE == GPIO_MAP
29 
30 static const uint32_t c_step_outmap[] = {
31  0,
32  X_STEP_BIT,
33  Y_STEP_BIT,
35  Z_STEP_BIT,
39  #if N_AXIS > 3
40  A_STEP_BIT,
41  A_STEP_BIT | X_STEP_BIT,
42  A_STEP_BIT | Y_STEP_BIT,
43  A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
44  A_STEP_BIT | Z_STEP_BIT,
45  A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
46  A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
47  A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
48  #endif
49  #if N_AXIS > 4
50  B_STEP_BIT,
51  B_STEP_BIT | X_STEP_BIT,
52  B_STEP_BIT | Y_STEP_BIT,
53  B_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
54  B_STEP_BIT | Z_STEP_BIT,
55  B_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
56  B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
57  B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
58  B_STEP_BIT | A_STEP_BIT,
59  B_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
60  B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
61  B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
62  B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
63  B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
64  B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
65  B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
66  #endif
67  #if N_AXIS > 5
68  C_STEP_BIT,
69  C_STEP_BIT | X_STEP_BIT,
70  C_STEP_BIT | Y_STEP_BIT,
71  C_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
72  C_STEP_BIT | Z_STEP_BIT,
73  C_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
74  C_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
75  C_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
76  C_STEP_BIT | A_STEP_BIT,
77  C_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
78  C_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
79  C_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
80  C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
81  C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
82  C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
83  C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
84  C_STEP_BIT | B_STEP_BIT,
85  C_STEP_BIT | B_STEP_BIT | X_STEP_BIT,
86  C_STEP_BIT | B_STEP_BIT | Y_STEP_BIT,
87  C_STEP_BIT | B_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
88  C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT,
89  C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
90  C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
91  C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
92  C_STEP_BIT | B_STEP_BIT | A_STEP_BIT,
93  C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
94  C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
95  C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
96  C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
97  C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
98  C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
99  C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
100  #endif
101  #if N_AXIS > 6
102  U_STEP_BIT,
103  U_STEP_BIT | X_STEP_BIT,
104  U_STEP_BIT | Y_STEP_BIT,
105  U_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
106  U_STEP_BIT | Z_STEP_BIT,
107  U_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
108  U_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
109  U_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
110  U_STEP_BIT | A_STEP_BIT,
111  U_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
112  U_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
113  U_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
114  U_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
115  U_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
116  U_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
117  U_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
118  U_STEP_BIT | B_STEP_BIT,
119  U_STEP_BIT | B_STEP_BIT | X_STEP_BIT,
120  U_STEP_BIT | B_STEP_BIT | Y_STEP_BIT,
121  U_STEP_BIT | B_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
122  U_STEP_BIT | B_STEP_BIT | Z_STEP_BIT,
123  U_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
124  U_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
125  U_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
126  U_STEP_BIT | B_STEP_BIT | A_STEP_BIT,
127  U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
128  U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
129  U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
130  U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
131  U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
132  U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
133  U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
134  U_STEP_BIT | C_STEP_BIT,
135  U_STEP_BIT | C_STEP_BIT | X_STEP_BIT,
136  U_STEP_BIT | C_STEP_BIT | Y_STEP_BIT,
137  U_STEP_BIT | C_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
138  U_STEP_BIT | C_STEP_BIT | Z_STEP_BIT,
139  U_STEP_BIT | C_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
140  U_STEP_BIT | C_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
141  U_STEP_BIT | C_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
142  U_STEP_BIT | C_STEP_BIT | A_STEP_BIT,
143  U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
144  U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
145  U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
146  U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
147  U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
148  U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
149  U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
150  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT,
151  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | X_STEP_BIT,
152  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Y_STEP_BIT,
153  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
154  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT,
155  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
156  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
157  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
158  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT,
159  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
160  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
161  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
162  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
163  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
164  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
165  U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
166  #endif
167  #if N_AXIS > 7
168  V_STEP_BIT,
169  V_STEP_BIT | X_STEP_BIT,
170  V_STEP_BIT | Y_STEP_BIT,
171  V_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
172  V_STEP_BIT | Z_STEP_BIT,
173  V_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
174  V_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
175  V_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
176  V_STEP_BIT | A_STEP_BIT,
177  V_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
178  V_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
179  V_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
180  V_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
181  V_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
182  V_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
183  V_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
184  V_STEP_BIT | B_STEP_BIT,
185  V_STEP_BIT | B_STEP_BIT | X_STEP_BIT,
186  V_STEP_BIT | B_STEP_BIT | Y_STEP_BIT,
187  V_STEP_BIT | B_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
188  V_STEP_BIT | B_STEP_BIT | Z_STEP_BIT,
189  V_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
190  V_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
191  V_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
192  V_STEP_BIT | B_STEP_BIT | A_STEP_BIT,
193  V_STEP_BIT | B_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
194  V_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
195  V_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
196  V_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
197  V_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
198  V_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
199  V_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
200  V_STEP_BIT | C_STEP_BIT,
201  V_STEP_BIT | C_STEP_BIT | X_STEP_BIT,
202  V_STEP_BIT | C_STEP_BIT | Y_STEP_BIT,
203  V_STEP_BIT | C_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
204  V_STEP_BIT | C_STEP_BIT | Z_STEP_BIT,
205  V_STEP_BIT | C_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
206  V_STEP_BIT | C_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
207  V_STEP_BIT | C_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
208  V_STEP_BIT | C_STEP_BIT | A_STEP_BIT,
209  V_STEP_BIT | C_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
210  V_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
211  V_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
212  V_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
213  V_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
214  V_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
215  V_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
216  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT,
217  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | X_STEP_BIT,
218  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Y_STEP_BIT,
219  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
220  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT,
221  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
222  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
223  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
224  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT,
225  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
226  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
227  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
228  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
229  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
230  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
231  V_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
232  V_STEP_BIT | U_STEP_BIT,
233  V_STEP_BIT | U_STEP_BIT | X_STEP_BIT,
234  V_STEP_BIT | U_STEP_BIT | Y_STEP_BIT,
235  V_STEP_BIT | U_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
236  V_STEP_BIT | U_STEP_BIT | Z_STEP_BIT,
237  V_STEP_BIT | U_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
238  V_STEP_BIT | U_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
239  V_STEP_BIT | U_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
240  V_STEP_BIT | U_STEP_BIT | A_STEP_BIT,
241  V_STEP_BIT | U_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
242  V_STEP_BIT | U_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
243  V_STEP_BIT | U_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
244  V_STEP_BIT | U_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
245  V_STEP_BIT | U_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
246  V_STEP_BIT | U_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
247  V_STEP_BIT | U_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
248  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT,
249  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | X_STEP_BIT,
250  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | Y_STEP_BIT,
251  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
252  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | Z_STEP_BIT,
253  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
254  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
255  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
256  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | A_STEP_BIT,
257  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
258  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
259  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
260  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
261  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
262  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
263  V_STEP_BIT | U_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
264  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT,
265  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | X_STEP_BIT,
266  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | Y_STEP_BIT,
267  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
268  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | Z_STEP_BIT,
269  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
270  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
271  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
272  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | A_STEP_BIT,
273  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
274  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
275  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
276  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
277  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
278  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
279  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
280  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT,
281  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | X_STEP_BIT,
282  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Y_STEP_BIT,
283  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
284  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT,
285  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
286  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
287  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
288  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT,
289  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | X_STEP_BIT,
290  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT,
291  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
292  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT,
293  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | X_STEP_BIT,
294  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT,
295  V_STEP_BIT | U_STEP_BIT | C_STEP_BIT | B_STEP_BIT | A_STEP_BIT | Z_STEP_BIT | Y_STEP_BIT | X_STEP_BIT,
296  #endif
297 };
298 
299 static uint32_t step_outmap[sizeof(c_step_outmap) / sizeof(uint32_t)];
300 
301 #endif
302 
303 #if DIRECTION_OUTMODE == GPIO_MAP
304 
305 static const uint32_t c_dir_outmap[] = {
306  0,
314  #if N_AXIS > 3
315  A_DIRECTION_BIT,
316  A_DIRECTION_BIT | X_DIRECTION_BIT,
317  A_DIRECTION_BIT | Y_DIRECTION_BIT,
318  A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
319  A_DIRECTION_BIT | Z_DIRECTION_BIT,
320  A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
321  A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
322  A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
323  #endif
324  #if N_AXIS > 4
325  B_DIRECTION_BIT,
326  B_DIRECTION_BIT | X_DIRECTION_BIT,
327  B_DIRECTION_BIT | Y_DIRECTION_BIT,
328  B_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
329  B_DIRECTION_BIT | Z_DIRECTION_BIT,
330  B_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
331  B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
332  B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
333  B_DIRECTION_BIT | A_DIRECTION_BIT,
334  B_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
335  B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
336  B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
337  B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
338  B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
339  B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
340  B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
341  #endif
342  #if N_AXIS > 5
343  C_DIRECTION_BIT,
344  C_DIRECTION_BIT | X_DIRECTION_BIT,
345  C_DIRECTION_BIT | Y_DIRECTION_BIT,
346  C_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
347  C_DIRECTION_BIT | Z_DIRECTION_BIT,
348  C_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
349  C_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
350  C_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
351  C_DIRECTION_BIT | A_DIRECTION_BIT,
352  C_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
353  C_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
354  C_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
355  C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
356  C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
357  C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
358  C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
359  C_DIRECTION_BIT | B_DIRECTION_BIT,
360  C_DIRECTION_BIT | B_DIRECTION_BIT | X_DIRECTION_BIT,
361  C_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT,
362  C_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
363  C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT,
364  C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
365  C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
366  C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
367  C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT,
368  C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
369  C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
370  C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
371  C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
372  C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
373  C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
374  C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
375  #endif
376  #if N_AXIS > 6
377  U_DIRECTION_BIT,
378  U_DIRECTION_BIT | X_DIRECTION_BIT,
379  U_DIRECTION_BIT | Y_DIRECTION_BIT,
380  U_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
381  U_DIRECTION_BIT | Z_DIRECTION_BIT,
382  U_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
383  U_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
384  U_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
385  U_DIRECTION_BIT | A_DIRECTION_BIT,
386  U_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
387  U_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
388  U_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
389  U_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
390  U_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
391  U_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
392  U_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
393  U_DIRECTION_BIT | B_DIRECTION_BIT,
394  U_DIRECTION_BIT | B_DIRECTION_BIT | X_DIRECTION_BIT,
395  U_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT,
396  U_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
397  U_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT,
398  U_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
399  U_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
400  U_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
401  U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT,
402  U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
403  U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
404  U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
405  U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
406  U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
407  U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
408  U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
409  U_DIRECTION_BIT | C_DIRECTION_BIT,
410  U_DIRECTION_BIT | C_DIRECTION_BIT | X_DIRECTION_BIT,
411  U_DIRECTION_BIT | C_DIRECTION_BIT | Y_DIRECTION_BIT,
412  U_DIRECTION_BIT | C_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
413  U_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT,
414  U_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
415  U_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
416  U_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
417  U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT,
418  U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
419  U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
420  U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
421  U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
422  U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
423  U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
424  U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
425  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT,
426  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | X_DIRECTION_BIT,
427  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT,
428  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
429  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT,
430  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
431  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
432  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
433  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT,
434  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
435  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
436  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
437  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
438  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
439  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
440  U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
441  #endif
442  #if N_AXIS > 7
443  V_DIRECTION_BIT,
444  V_DIRECTION_BIT | X_DIRECTION_BIT,
445  V_DIRECTION_BIT | Y_DIRECTION_BIT,
446  V_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
447  V_DIRECTION_BIT | Z_DIRECTION_BIT,
448  V_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
449  V_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
450  V_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
451  V_DIRECTION_BIT | A_DIRECTION_BIT,
452  V_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
453  V_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
454  V_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
455  V_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
456  V_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
457  V_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
458  V_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
459  V_DIRECTION_BIT | B_DIRECTION_BIT,
460  V_DIRECTION_BIT | B_DIRECTION_BIT | X_DIRECTION_BIT,
461  V_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT,
462  V_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
463  V_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT,
464  V_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
465  V_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
466  V_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
467  V_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT,
468  V_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
469  V_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
470  V_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
471  V_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
472  V_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
473  V_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
474  V_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
475  V_DIRECTION_BIT | C_DIRECTION_BIT,
476  V_DIRECTION_BIT | C_DIRECTION_BIT | X_DIRECTION_BIT,
477  V_DIRECTION_BIT | C_DIRECTION_BIT | Y_DIRECTION_BIT,
478  V_DIRECTION_BIT | C_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
479  V_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT,
480  V_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
481  V_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
482  V_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
483  V_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT,
484  V_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
485  V_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
486  V_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
487  V_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
488  V_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
489  V_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
490  V_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
491  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT,
492  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | X_DIRECTION_BIT,
493  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT,
494  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
495  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT,
496  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
497  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
498  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
499  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT,
500  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
501  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
502  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
503  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
504  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
505  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
506  V_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
507  V_DIRECTION_BIT | U_DIRECTION_BIT,
508  V_DIRECTION_BIT | U_DIRECTION_BIT | X_DIRECTION_BIT,
509  V_DIRECTION_BIT | U_DIRECTION_BIT | Y_DIRECTION_BIT,
510  V_DIRECTION_BIT | U_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
511  V_DIRECTION_BIT | U_DIRECTION_BIT | Z_DIRECTION_BIT,
512  V_DIRECTION_BIT | U_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
513  V_DIRECTION_BIT | U_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
514  V_DIRECTION_BIT | U_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
515  V_DIRECTION_BIT | U_DIRECTION_BIT | A_DIRECTION_BIT,
516  V_DIRECTION_BIT | U_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
517  V_DIRECTION_BIT | U_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
518  V_DIRECTION_BIT | U_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
519  V_DIRECTION_BIT | U_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
520  V_DIRECTION_BIT | U_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
521  V_DIRECTION_BIT | U_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
522  V_DIRECTION_BIT | U_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
523  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT,
524  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | X_DIRECTION_BIT,
525  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT,
526  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
527  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT,
528  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
529  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
530  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
531  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT,
532  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
533  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
534  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
535  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
536  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
537  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
538  V_DIRECTION_BIT | U_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
539  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT,
540  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | X_DIRECTION_BIT,
541  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | Y_DIRECTION_BIT,
542  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
543  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT,
544  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
545  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
546  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
547  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT,
548  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
549  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
550  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
551  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
552  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
553  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
554  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
555  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT,
556  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | X_DIRECTION_BIT,
557  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT,
558  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
559  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT,
560  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
561  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
562  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
563  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT,
564  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | X_DIRECTION_BIT,
565  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT,
566  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
567  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT,
568  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | X_DIRECTION_BIT,
569  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT,
570  V_DIRECTION_BIT | U_DIRECTION_BIT | C_DIRECTION_BIT | B_DIRECTION_BIT | A_DIRECTION_BIT | Z_DIRECTION_BIT | Y_DIRECTION_BIT | X_DIRECTION_BIT,
571  #endif
572 };
573 
574 
575 static uint32_t dir_outmap[sizeof(c_dir_outmap) / sizeof(uint32_t)];
576 
577 #endif
578 
579 #if (STEP_OUTMODE == GPIO_MAP) || (DIRECTION_OUTMODE == GPIO_MAP)
580 
581 #define USE_STEPDIR_MAP 1
582 
583 static void stepdirmap_init (settings_t *settings)
584 {
585  uint_fast8_t i;
586 
587 #if STEP_OUTMODE == GPIO_MAP
588 
589  i = sizeof(step_outmap) / sizeof(uint32_t);
590  do {
591  i--;
592  step_outmap[i] = c_step_outmap[i ^ settings->steppers.step_invert.value];
593  } while(i);
594 #endif
595 
596 #if DIRECTION_OUTMODE == GPIO_MAP
597  i = sizeof(dir_outmap) / sizeof(uint32_t);
598  do {
599  i--;
600  dir_outmap[i] = c_dir_outmap[i ^ settings->steppers.dir_invert.value];
601  } while(i);
602 #endif
603 }
604 
605 #endif
606 
#define Z_DIRECTION_BIT
Definition: motor_pins.h:1007
#define X_STEP_BIT
Definition: motor_pins.h:964
#define Y_STEP_BIT
Definition: motor_pins.h:967
#define X_DIRECTION_BIT
Definition: motor_pins.h:1001
#define Y_DIRECTION_BIT
Definition: motor_pins.h:1004
#define Z_STEP_BIT
Definition: motor_pins.h:970
settings_t settings
Definition: settings.c:43
Definition: settings.h:804
stepper_settings_t steppers
Definition: settings.h:824
axes_signals_t dir_invert
Definition: settings.h:700
axes_signals_t step_invert
Definition: settings.h:699
uint8_t value
Definition: nuts_bolts.h:133