-
Notifications
You must be signed in to change notification settings - Fork 2
/
config_ose.h
119 lines (98 loc) · 4.01 KB
/
config_ose.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
config_ose.h - compile time configuration, specific to OSE steppernug systems
Part of Grbl
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011-2012 Sungeun K. Jeon
Copyright (c) 2012 Chuck Harrison
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
// included from bottom of config.h
// I2C I/O Expander
#define MCP23017_PRESENT
#define MCP23017_ADDR 0x20 // 7-bit address, lsbits are A2..A0
// Define pin-assignments
#undef STEPPING_DDR
#undef STEPPING_PORT
#define STEPPING_DDR DDRB
#define STEPPING_PORT PORTB
#undef X_STEP_BIT
#undef Y_STEP_BIT
#undef Z_STEP_BIT
#undef X_DIRECTION_BIT
#undef Y_DIRECTION_BIT
#undef Z_DIRECTION_BIT
#undef STEP_MASK
#undef DIRECTION_MASK
#undef STEPPING_MASK
#define X_STEP_BIT 5 // Uno Digital Pin 13
#define Y_STEP_BIT 3 // Uno Digital Pin 11
#define Z_STEP_BIT 1 // Uno Digital Pin 9
#define X_DIRECTION_BIT 4 // Uno Digital Pin 12
#define Y_DIRECTION_BIT 2 // Uno Digital Pin 10
#define Z_DIRECTION_BIT 0 // Uno Digital Pin 8
#define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits
#define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits
#define STEPPING_MASK (STEP_MASK | DIRECTION_MASK) // All stepping-related bits (step/direction)
#undef STEPPERS_DISABLE_DDR
#undef STEPPERS_DISABLE_PORT
#undef STEPPERS_DISABLE_BIT
#undef STEPPERS_DISABLE_MASK
#undef STEPPERS_DISABLE_INVERT_MASK
#define STEPPERS_DISABLE_DDR DDRD
#define STEPPERS_DISABLE_PORT PORTD
#define STEPPERS_DISABLE_BIT 4 // Uno Digital Pin 4
#define X2_DISABLE_BIT 3 // Uno Digital Pin 3 Hi disables X2
#define STEPPERS_DISABLE_MASK ((1<<STEPPERS_DISABLE_BIT)|(1<<X2_DISABLE_BIT))
#define STEPPERS_DISABLE_INVERT_MASK (1<<STEPPERS_DISABLE_BIT) // Logic low out for disable (e.g. steppernug)
#undef LIMIT_DDR
#undef LIMIT_PIN
#undef LIMIT_PORT
#undef X_LIMIT_BIT
#undef Y_LIMIT_BIT
#undef Z_LIMIT_BIT
#undef LIMIT_MASK
#undef HOME_MASK
#define USE_I2C_LIMITS
#ifdef USE_I2C_LIMITS
#undef LIMIT_INT
#define X_LIMIT_BIT 1 // I2C expander GPB1 Pin 2
#define Y_LIMIT_BIT 3 // I2C expander GPB3 Pin 4
#define Z_LIMIT_BIT 5 // I2C expander GPB5 Pin 6
#define X2_LIMIT_BIT 7 // I2C expander GPB7 Pin 8
#define X_HOME_BIT 7 // I2C expander GPA7 Pin 28
#define Y_HOME_BIT 6 // I2C expander GPA6 Pin 27
#define Z_HOME_BIT 5 // I2C expander GPA5 Pin 26
#define X2_HOME_BIT 2 // I2C expander GPA2 Pin 23
// interrupt-driven read of MCP23017 I2C io extender input from its change of state output
#define MCP23017_INT_PIN 0 // INT0
#define MCP23017_INT_vect INT0_vect
#else
#define X2_LIMIT_BIT 2 // Uno Digital Pin 2 (INT0)
#define LIMIT_DDR DDRD
#define LIMIT_PIN PIND
#define LIMIT_PORT PORTD
#define X_LIMIT_BIT 7 // Uno Digital Pin 7
#define Y_LIMIT_BIT 6 // Uno Digital Pin 6
#define Z_LIMIT_BIT 5 // Uno Digital Pin 5
#define X2_LIMIT_BIT 2 // Uno Digital Pin 2 (INT0)
#define HOME_PIN PIND
#define X_HOME_BIT 7 // Uno Digital Pin 7
#define Y_HOME_BIT 6 // Uno Digital Pin 6
#define Z_HOME_BIT 5 // Uno Digital Pin 5
#define X2_HOME_BIT 2 // Uno Digital Pin 2 (INT0)
#endif
#define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<X2_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT)) // All limit bits
#define HOME_MASK ((1<<X_HOME_BIT)|(1<<X2_HOME_BIT)|(1<<Y_HOME_BIT)|(1<<Z_HOME_BIT)) // All limit bits
#define LIMITS_INVERT_MASK 0
#define SPINDLE_PRESENT
#undef COOLANT_PRESENT
#define SPINDLE_ON_I2C