Prusa MINI Firmware overview
pins_LERDGE_X.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 X supports up to 2 hotends / E-steppers."
25 #endif
26 
27 #define BOARD_INFO_NAME "Lerdge X"
28 #define DEFAULT_MACHINE_NAME "LERDGE"
29 
30 //#define I2C_EEPROM
31 
32 //
33 // Servos
34 //
35 //#define SERVO0_PIN PD12
36 //#define SERVO1_PIN -1
37 
38 //
39 // Limit Switches
40 //
41 #define X_STOP_PIN PB12
42 #define Y_STOP_PIN PB13
43 #define Z_STOP_PIN PB14
44 
45 //
46 // Filament runout
47 //
48 #define FIL_RUNOUT_PIN PE1
49 
50 //
51 // Z Probe (when not Z_MIN_PIN)
52 //
53 //#ifndef Z_MIN_PROBE_PIN
54 // #define Z_MIN_PROBE_PIN PB15
55 //#endif
56 
57 //
58 // Steppers
59 //
60 #define X_STEP_PIN PB10
61 #define X_DIR_PIN PB2
62 #define X_ENABLE_PIN PB11
63 //#ifndef X_CS_PIN
64 // #define X_CS_PIN PD1
65 //#endif
66 
67 #define Y_STEP_PIN PB0
68 #define Y_DIR_PIN PC5
69 #define Y_ENABLE_PIN PB1
70 //#ifndef Y_CS_PIN
71 // #define Y_CS_PIN PE12
72 //#endif
73 
74 #define Z_STEP_PIN PA7
75 #define Z_DIR_PIN PA6
76 #define Z_ENABLE_PIN PC4
77 //#ifndef Z_CS_PIN
78 // #define Z_CS_PIN PD5
79 //#endif
80 
81 #define E0_STEP_PIN PA4
82 #define E0_DIR_PIN PA3
83 #define E0_ENABLE_PIN PA5
84 //#ifndef E0_CS_PIN
85 // #define E0_CS_PIN PB4
86 //#endif
87 
88 #define E1_STEP_PIN -1
89 #define E1_DIR_PIN -1
90 #define E1_ENABLE_PIN -1
91 //#ifndef E1_CS_PIN
92 // #define E1_CS_PIN PE5
93 //#endif
94 
95 //
96 // Temperature Sensors
97 //
98 #define TEMP_0_PIN PC0 // Analog Input
99 #define TEMP_1_PIN -1 // Analog Input
100 #define TEMP_BED_PIN PC1 // Analog Input
101 
102 //
103 // Heaters / Fans
104 //
105 #define HEATER_0_PIN PA1
106 #define HEATER_1_PIN -1
107 #define HEATER_BED_PIN PA2
108 
109 #ifndef FAN_PIN
110 // #define FAN_PIN PC15
111 #endif
112 #define FAN1_PIN PC15
113 #define FAN2_PIN PA0
114 
115 #define ORIG_E0_AUTO_FAN_PIN PC15 // Use this by NOT overriding E0_AUTO_FAN_PIN
116 
117 //
118 // Prusa i3 MK2 Multi Material Multiplexer Support
119 //
120 //#define E_MUX0_PIN -1
121 //#define E_MUX1_PIN -1
122 
123 //
124 // LED / Lighting
125 //
126 //#define CASE_LIGHT_PIN_CI -1
127 //#define CASE_LIGHT_PIN_DO -1
128 //#define NEOPIXEL_PIN -1
129 
130 //
131 // Misc. Functions
132 //
133 #define SDSS PC11
134 #define LED_PIN PC7 // Alive
135 #define PS_ON_PIN -1
136 #define KILL_PIN -1
137 #define POWER_LOSS_PIN -1 // Power-loss / nAC_FAULT
138 
139 #define SCK_PIN PC12
140 #define MISO_PIN PC8
141 #define MOSI_PIN PD2
142 #define SS_PIN PC11
143 
144 //
145 // SD support
146 //
147 #define SDIO_SUPPORT
148 
149 //
150 // LCD / Controller
151 //
152 
153 // The LCD is initialized in FSMC mode
154 #define SD_DETECT_PIN -1
155 #define BEEPER_PIN PD12
156 
157 #define BTN_EN1 PE3
158 #define BTN_EN2 PE4
159 #define BTN_ENC PE2
160 
161 #define LCD_RESET_PIN PD6
162 #define LCD_BACKLIGHT_PIN PD3
163 #define FSMC_CS_PIN PD4
164 #define FSMC_RS_PIN PD11
165 #define TOUCH_CS PB6
166 
167 //
168 // ST7920 Delays
169 //
170 #ifndef ST7920_DELAY_1
171  #define ST7920_DELAY_1 DELAY_NS(96)
172 #endif
173 #ifndef ST7920_DELAY_2
174  #define ST7920_DELAY_2 DELAY_NS(48)
175 #endif
176 #ifndef ST7920_DELAY_3
177  #define ST7920_DELAY_3 DELAY_NS(715)
178 #endif