update firmware.bin
[clinton/Smoothieware.git] / src / libs / nuts_bolts.h
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
23
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))
33 #define clear_vector_float(a) memset(a, 0, sizeof(a))
34
35 #define confine(value, min, max) (((value) < (min))?(min):(((value) > (max))?(max):(value)))
36
37 #define dd(...) LPC_GPIO2->FIODIR = 0xffff; LPC_GPIO2->FIOCLR = 0xffff; LPC_GPIO2->FIOSET = __VA_ARGS__
38
39
40 #endif
41