blob: bf6df035623750aaf36c057aaee6eb748da25ffa (
plain) (
blame)
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program 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.
*
* This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#if NOT_TARGET(STM32F4, STM32F4xx)
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "LERDGE K supports up to 2 hotends / E-steppers."
#endif
#define BOARD_INFO_NAME "Lerdge K"
#define DEFAULT_MACHINE_NAME "LERDGE"
#define I2C_EEPROM
// USB Flash Drive support
#define HAS_OTG_USB_HOST_SUPPORT
//
// Servos
//
//#define SERVO0_PIN PB11
//
// Limit Switches
//
#define X_STOP_PIN PG3
#define Y_STOP_PIN PG4
#define Z_STOP_PIN PG5
//
// Z Probe (when not Z_MIN_PIN)
//
//#ifndef Z_MIN_PROBE_PIN
// #define Z_MIN_PROBE_PIN PG6
//#endif
//
// Filament runout
//
#define FIL_RUNOUT_PIN PE5
#define FIL_RUNOUT2_PIN PE6
//
// Steppers
//
#define X_STEP_PIN PG1
#define X_DIR_PIN PB10
#define X_ENABLE_PIN PG0
//#ifndef X_CS_PIN
// #define X_CS_PIN PE0
//#endif
#define Y_STEP_PIN PF14
#define Y_DIR_PIN PF15
#define Y_ENABLE_PIN PF13
//#ifndef Y_CS_PIN
// #define Y_CS_PIN PE1
//#endif
#define Z_STEP_PIN PF11
#define Z_DIR_PIN PF12
#define Z_ENABLE_PIN PC5
//#ifndef Z_CS_PIN
// #define Z_CS_PIN PE2
//#endif
#define E0_STEP_PIN PC14
#define E0_DIR_PIN PC13
#define E0_ENABLE_PIN PC15
//#ifndef E0_CS_PIN
// #define E0_CS_PIN PE3
//#endif
#define E1_STEP_PIN PF1
#define E1_DIR_PIN PF0
#define E1_ENABLE_PIN PF2
//#ifndef E1_CS_PIN
// #define E1_CS_PIN PE4
//#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // Analog Input
#define TEMP_1_PIN PC2 // Analog Input
#define TEMP_BED_PIN PC0 // Analog Input
// Lergde-K can choose thermocouple/thermistor mode in software.
// For use with thermistors, these pins must be OUT/LOW.
// This is done automatically.
#define TEMP_0_TR_ENABLE_PIN PF10
#define TEMP_1_TR_ENABLE_PIN PF9
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1
#define HEATER_1_PIN PA0
#define HEATER_BED_PIN PA2
#ifndef FAN_PIN
#define FAN_PIN PF7
#endif
#define FAN1_PIN PF6
#define FAN2_PIN PF8
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN PF6
#endif
//
// LED / Lighting
//
//#define CASE_LIGHT_PIN_CI -1
//#define CASE_LIGHT_PIN_DO -1
//#define NEOPIXEL_PIN -1
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PB7
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PB8
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PB9
#endif
//
// SD support
//
#define SDIO_SUPPORT
#define SDIO_CLOCK 4800000
//
// Misc. Functions
//
#define SDSS PC11
#define LED_PIN PA15 // Alive
#define PS_ON_PIN -1
#define KILL_PIN -1
#define POWER_LOSS_PIN PA4 // Power-loss / nAC_FAULT
#define SD_SCK_PIN PC12
#define SD_MISO_PIN PC8
#define SD_MOSI_PIN PD2
#define SD_SS_PIN PC11
#define SD_DETECT_PIN PA8
#define BEEPER_PIN PC7
//
// LCD / Controller
//
#define TFT_RESET_PIN PD6
#define TFT_BACKLIGHT_PIN PD3
#define TFT_CS_PIN PD7
#define TFT_RS_PIN PD11
#define TOUCH_CS_PIN PG15
#define TOUCH_SCK_PIN PB3
#define TOUCH_MOSI_PIN PB5
#define TOUCH_MISO_PIN PB4
#define BTN_EN1 PG10
#define BTN_EN2 PG11
#define BTN_ENC PG9
|