Commit | Line | Data |
---|---|---|
4cff3ded AW |
1 | /* |
2 | nuts_bolts.h - cartesian robot controller. | |
3 | Part of Grbl | |
4 | ||
5 | Copyright (c) 2009-2011 Simen Svale Skogsrud | |
6 | ||
7 | Grbl is free software: you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation, either version 3 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | Grbl is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with Grbl. If not, see <http://www.gnu.org/licenses/>. | |
19 | */ | |
20 | ||
21 | #ifndef nuts_bolts_h | |
22 | #define nuts_bolts_h | |
4eb9c745 | 23 | |
4cff3ded AW |
24 | #define X_AXIS 0 |
25 | #define Y_AXIS 1 | |
26 | #define Z_AXIS 2 | |
27 | ||
28 | #define ALPHA_STEPPER 0 | |
29 | #define BETA_STEPPER 1 | |
30 | #define GAMMA_STEPPER 2 | |
31 | ||
32 | #define clear_vector(a) memset(a, 0, sizeof(a)) | |
1cf31736 | 33 | #define clear_vector_float(a) memset(a, 0.0F, sizeof(a)) |
4cff3ded | 34 | |
11f8ba4e MM |
35 | #define confine(value, min, max) (((value) < (min))?(min):(((value) > (max))?(max):(value))) |
36 | ||
df27a6a3 | 37 | #define dd(...) LPC_GPIO2->FIODIR = 0xffff; LPC_GPIO2->FIOCLR = 0xffff; LPC_GPIO2->FIOSET = __VA_ARGS__ |
4cff3ded | 38 | |
4eb9c745 | 39 | |
4cff3ded AW |
40 | #endif |
41 |