Prusa MINI Firmware overview
pins_LERDGE_K.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 #pragma once
20 
21 #if !defined(STM32F4) && !defined(STM32F4xx)
22  #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
23 #elif HOTENDS > 2 || E_STEPPERS > 2
24  #error "LERDGE K supports up to 2 hotends / E-steppers."
25 #endif
26 
27 #define BOARD_INFO_NAME "Lerdge K"
28 #define DEFAULT_MACHINE_NAME "LERDGE"
29 
30 #define I2C_EEPROM
31 
32 // Ignore temp readings during develpment.
33 //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
34 
35 //
36 // Servos
37 //
38 //#define SERVO0_PIN PD12
39 
40 //
41 // Limit Switches
42 //
43 #define X_STOP_PIN PG3
44 #define Y_STOP_PIN PG4
45 #define Z_STOP_PIN PG5
46 
47 //
48 // Z Probe (when not Z_MIN_PIN)
49 //
50 //#ifndef Z_MIN_PROBE_PIN
51 // #define Z_MIN_PROBE_PIN PB15
52 //#endif
53 
54 //
55 // Filament runout
56 //
57 #define FIL_RUNOUT_PIN PE6
58 #define FIL_RUNOUT2_PIN PE7
59 
60 //
61 // Steppers
62 //
63 #define X_STEP_PIN PG1
64 #define X_DIR_PIN PB10
65 #define X_ENABLE_PIN PG0
66 //#ifndef X_CS_PIN
67 // #define X_CS_PIN PE0
68 //#endif
69 
70 #define Y_STEP_PIN PF14
71 #define Y_DIR_PIN PF15
72 #define Y_ENABLE_PIN PF13
73 //#ifndef Y_CS_PIN
74 // #define Y_CS_PIN PE1
75 //#endif
76 
77 #define Z_STEP_PIN PF11
78 #define Z_DIR_PIN PF12
79 #define Z_ENABLE_PIN PC5
80 //#ifndef Z_CS_PIN
81 // #define Z_CS_PIN PE2
82 //#endif
83 
84 #define E0_STEP_PIN PC14
85 #define E0_DIR_PIN PC13
86 #define E0_ENABLE_PIN PC15
87 //#ifndef E0_CS_PIN
88 // #define E0_CS_PIN PE3
89 //#endif
90 
91 #define E1_STEP_PIN PF1
92 #define E1_DIR_PIN PF0
93 #define E1_ENABLE_PIN PF2
94 //#ifndef E1_CS_PIN
95 // #define E1_CS_PIN PE4
96 //#endif
97 
98 //
99 // Temperature Sensors
100 //
101 #define TEMP_0_PIN PC1 // Analog Input
102 #define TEMP_1_PIN PC2 // Analog Input
103 #define TEMP_BED_PIN PC0 // Analog Input
104 
105 //
106 // Heaters / Fans
107 //
108 #define HEATER_0_PIN PA1
109 #define HEATER_1_PIN PA0
110 #define HEATER_BED_PIN PA2
111 
112 #ifndef FAN_PIN
113  #define FAN_PIN PC15
114 #endif
115 #define FAN1_PIN PF6
116 #define FAN2_PIN PF7
117 
118 #define ORIG_E0_AUTO_FAN_PIN FAN1_PIN // Use this by NOT overriding E0_AUTO_FAN_PIN
119 
120 //
121 // LED / Lighting
122 //
123 //#define CASE_LIGHT_PIN_CI -1
124 //#define CASE_LIGHT_PIN_DO -1
125 //#define NEOPIXEL_PIN -1
126 
127 //
128 // Prusa i3 MK2 Multi-Material Multiplexer Support
129 //
130 //#define E_MUX0_PIN -1
131 //#define E_MUX1_PIN -1
132 
133 //
134 // SD support
135 //
136 #define SDIO_SUPPORT
137 
138 //
139 // Misc. Functions
140 //
141 #define SDSS PC11
142 #define LED_PIN PC7 // Alive
143 #define PS_ON_PIN -1
144 #define KILL_PIN -1
145 #define POWER_LOSS_PIN -1 // Power-loss / nAC_FAULT
146 
147 #define SCK_PIN PC12
148 #define MISO_PIN PC8
149 #define MOSI_PIN PD2
150 #define SS_PIN PC11
151 
152 //
153 // LCD / Controller
154 //
155 
156 // TODO: Replace these with the correct FSMC pins, once known
157 #define SD_DETECT_PIN -1
158 #define BEEPER_PIN PD12
159 #define LCD_PINS_RS -1
160 #define LCD_PINS_ENABLE -1
161 #define LCD_PINS_D4 -1
162 #define LCD_PINS_D5 -1
163 #define LCD_PINS_D6 -1
164 #define LCD_PINS_D7 -1
165 
166 #define BTN_EN1 PE3
167 #define BTN_EN2 PE4
168 #define BTN_ENC PE2
169 
170 //
171 // ST7920 Delays
172 //
173 #ifndef ST7920_DELAY_1
174  #define ST7920_DELAY_1 DELAY_NS(96)
175 #endif
176 #ifndef ST7920_DELAY_2
177  #define ST7920_DELAY_2 DELAY_NS(48)
178 #endif
179 #ifndef ST7920_DELAY_3
180  #define ST7920_DELAY_3 DELAY_NS(715)
181 #endif