forked from grblHAL/RP2040
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cnc_boosterpack_map.h
115 lines (90 loc) · 3.29 KB
/
cnc_boosterpack_map.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
/*
cnc_boosterpack_map.h - driver code for RP2040 ARM processors
Part of grblHAL
Copyright (c) 2021-2022 Terje Io
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/>.
*/
#if TRINAMIC_ENABLE
#error Trinamic plugin not supported!
#endif
#if N_ABC_MOTORS
#error "Axis configuration is not supported!"
#endif
#define BOARD_NAME "CNC BoosterPack"
#define BOARD_URL "https://github.com/terjeio/CNC_Boosterpack"
#define IOEXPAND_ENABLE 1
#undef EEPROM_ENABLE
#define EEPROM_ENABLE 1
#if EEPROM_ENABLE
#undef I2C_ENABLE
#define I2C_ENABLE 1
#endif
// Define step pulse output pins.
#define STEP_PORT GPIO_PIO // N_AXIS pin PIO SM
#define STEP_PINS_BASE 2 // N_AXIS number of consecutive pins are used by PIO
// Define step direction output pins.
#define DIRECTION_PORT GPIO_OUTPUT
#define X_DIRECTION_PIN 5
#define Y_DIRECTION_PIN 6
#define Z_DIRECTION_PIN 7
#define DIRECTION_OUTMODE GPIO_SHIFT5
// Define stepper driver enable/disable output pin.
#define ENABLE_PORT GPIO_IOEXPAND
#define STEPPERS_ENABLEX_PIN 6
#define STEPPERS_ENABLEZ_PIN 0
// Define homing/hard limit switch input pins.
#define LIMIT_PORT GPIO_IN
#define X_LIMIT_PIN 19
#define Y_LIMIT_PIN 20
#define Z_LIMIT_PIN 10
#define LIMIT_INMODE GPIO_OE
// Define spindle enable and spindle direction output pins.
#define SPINDLE_PORT GPIO_IOEXPAND
#define SPINDLE_ENABLE_PIN 0
#define SPINDLE_DIRECTION_PIN 5
// Define spindle PWM output pin.
#define SPINDLE_PWM_PORT GPIO_OUTPUT
#define SPINDLE_PWM_PIN 11
// Define flood and mist coolant enable output pins.
#define COOLANT_PORT GPIO_IOEXPAND
#define COOLANT_FLOOD_PIN 2
#define COOLANT_MIST_PIN 3
// Define user-control controls (cycle start, reset, feed hold) input pins.
#define RESET_PIN 12
#define FEED_HOLD_PIN 13
#define CYCLE_START_PIN 14
#if SAFETY_DOOR_ENABLE
#define SAFETY_DOOR_PIN 15
#endif
// Define probe switch input pin.
#define PROBE_PORT GPIO_INPUT
#define PROBE_PIN 16
#if I2C_STROBE_ENABLE
#define I2C_STROBE_PIN 17
#endif
#if I2C_ENABLE
#define I2C_PORT 1
#define I2C_SDA 10
#define I2C_SCL 11
#endif
#if SDCARD_ENABLE
#define SPI_PORT spi0
#define SD_MISO_PIN 16
#define SD_CS_PIN 17
#define SD_SCK_PIN 18
#define SD_MOSI_PIN 19
#endif
#if MPG_MODE_ENABLE
#define MODE_SWITCH_PIN 18
#endif
//I2C: 26,27
//Free: 21,21,22,28