Prusa MINI Firmware overview
Conditionals_LCD.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  * Based on Sprinter and grbl.
6  * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 #pragma once
23 
24 /**
25  * Conditionals_LCD.h
26  * Conditionals that need to be set before Configuration_adv.h or pins.h
27  */
28 
29 #if ENABLED(CARTESIO_UI)
30 
31  #define DOGLCD
32  #define IS_ULTIPANEL
33 
34 #elif ENABLED(ZONESTAR_LCD)
35 
36  #define ADC_KEYPAD
37  #define IS_RRW_KEYPAD
38  #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
39  #define ADC_KEY_NUM 8
40  #define IS_ULTIPANEL
41 
42  // This helps to implement ADC_KEYPAD menus
43  #define REVERSE_MENU_DIRECTION
44  #define ENCODER_PULSES_PER_STEP 1
45  #define ENCODER_STEPS_PER_MENU_ITEM 1
46  #define ENCODER_FEEDRATE_DEADZONE 2
47 
48 #elif ENABLED(RADDS_DISPLAY)
49  #define IS_ULTIPANEL
50  #define ENCODER_PULSES_PER_STEP 2
51 
52 #elif EITHER(ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER)
53 
54  #define IS_RRD_FG_SC
55 
56 #elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
57 
58  #define IS_ULTRA_LCD
59  #define DOGLCD
60  #define IS_ULTIPANEL
61 
62  #if ENABLED(miniVIKI)
63  #define U8GLIB_ST7565_64128N
64  #elif ENABLED(VIKI2)
65  #define U8GLIB_ST7565_64128N
66  #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
67  #define U8GLIB_LM6059_AF
68  #define SD_DETECT_INVERTED
69  #elif ENABLED(AZSMZ_12864)
70  #define U8GLIB_ST7565_64128N
71  #endif
72 
73 #elif ENABLED(OLED_PANEL_TINYBOY2)
74 
75  #define IS_U8GLIB_SSD1306
76  #define IS_ULTIPANEL
77 
78 #elif ENABLED(RA_CONTROL_PANEL)
79 
80  #define LCD_I2C_TYPE_PCA8574
81  #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
82  #define IS_ULTIPANEL
83 
84 #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
85 
86  #define DOGLCD
87  #define U8GLIB_ST7920
88  #define IS_ULTIPANEL
89 
90 #elif ENABLED(CR10_STOCKDISPLAY)
91 
92  #define IS_RRD_FG_SC
93  #ifndef ST7920_DELAY_1
94  #define ST7920_DELAY_1 DELAY_NS(125)
95  #endif
96  #ifndef ST7920_DELAY_2
97  #define ST7920_DELAY_2 DELAY_NS(125)
98  #endif
99  #ifndef ST7920_DELAY_3
100  #define ST7920_DELAY_3 DELAY_NS(125)
101  #endif
102 
103 #elif ENABLED(MKS_12864OLED)
104 
105  #define IS_RRD_SC
106  #define U8GLIB_SH1106
107 
108 #elif ENABLED(MKS_12864OLED_SSD1306)
109 
110  #define IS_RRD_SC
111  #define IS_U8GLIB_SSD1306
112 
113 #elif ENABLED(MKS_MINI_12864)
114 
115  #define MINIPANEL
116 
117 #elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
118 
119  #define FYSETC_MINI_12864
120  #define DOGLCD
121  #define IS_ULTIPANEL
122  #define LED_COLORS_REDUCE_GREEN
123  #if HAS_POWER_SWITCH && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
124  #define LED_BACKLIGHT_TIMEOUT 10000
125  #endif
126 
127  // Require LED backlighting enabled
128  #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
129  #define RGB_LED
130  #elif ENABLED(FYSETC_MINI_12864_2_1)
131  #define LED_CONTROL_MENU
132  #define NEOPIXEL_LED
133  #undef NEOPIXEL_TYPE
134  #define NEOPIXEL_TYPE NEO_RGB
135  #if NEOPIXEL_PIXELS < 3
136  #undef NEOPIXELS_PIXELS
137  #define NEOPIXEL_PIXELS 3
138  #endif
139  #ifndef NEOPIXEL_BRIGHTNESS
140  #define NEOPIXEL_BRIGHTNESS 127
141  #endif
142  //#define NEOPIXEL_STARTUP_TEST
143  #endif
144 
145 #elif ENABLED(ULTI_CONTROLLER)
146 
147  #define IS_ULTIPANEL
148  #define U8GLIB_SSD1309
149  #define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin
150  #define ENCODER_PULSES_PER_STEP 2
151  #define ENCODER_STEPS_PER_MENU_ITEM 2
152 
153 #elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
154 
155  #define IS_RRD_SC
156  #define LCD_WIDTH 16
157  #define LCD_HEIGHT 2
158 
159 #endif
160 
161 #if ENABLED(IS_RRD_FG_SC)
162  #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
163 #endif
164 
165 #if EITHER(MAKRPANEL, MINIPANEL)
166  #define IS_ULTIPANEL
167  #define DOGLCD
168  #if ENABLED(MAKRPANEL)
169  #define U8GLIB_ST7565_64128N
170  #endif
171 #endif
172 
173 #if ENABLED(IS_U8GLIB_SSD1306)
174  #define U8GLIB_SSD1306
175 #endif
176 
177 #if ENABLED(OVERLORD_OLED)
178  #define IS_ULTIPANEL
179  #define U8GLIB_SH1106
180  /**
181  * PCA9632 for buzzer and LEDs via i2c
182  * No auto-inc, red and green leds switched, buzzer
183  */
184  #define PCA9632
185  #define PCA9632_NO_AUTO_INC
186  #define PCA9632_GRN 0x00
187  #define PCA9632_RED 0x02
188  #define PCA9632_BUZZER
189  #define PCA9632_BUZZER_DATA { 0x09, 0x02 }
190 
191  #define ENCODER_PULSES_PER_STEP 1 // Overlord uses buttons
192  #define ENCODER_STEPS_PER_MENU_ITEM 1
193 #endif
194 
195 // 128x64 I2C OLED LCDs - SSD1306/SSD1309/SH1106
196 #define HAS_SSD1306_OLED_I2C ANY(U8GLIB_SSD1306, U8GLIB_SSD1309, U8GLIB_SH1106)
197 #if HAS_SSD1306_OLED_I2C
198  #define IS_ULTRA_LCD
199  #define DOGLCD
200 #endif
201 
202 // ST7920-based graphical displays
203 #if ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
204  #define DOGLCD
205  #define U8GLIB_ST7920
206  #define IS_RRD_SC
207 #endif
208 
209 // RepRapDiscount LCD or Graphical LCD with rotary click encoder
210 #if ENABLED(IS_RRD_SC)
211  #define REPRAP_DISCOUNT_SMART_CONTROLLER
212 #endif
213 
214 /**
215  * SPI Ultipanels
216  */
217 
218 // Basic Ultipanel-like displays
219 #if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, RIGIDBOT_PANEL, PANEL_ONE, U8GLIB_SH1106)
220  #define IS_ULTIPANEL
221 #endif
222 
223 // Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h
224 #if ENABLED(U8GLIB_SH1106_EINSTART)
225  #define DOGLCD
226  #define IS_ULTIPANEL
227 #endif
228 
229 // FSMC/SPI TFT Panels
230 #if ENABLED(FSMC_GRAPHICAL_TFT)
231  #define DOGLCD
232  #define IS_ULTIPANEL
233  #define DELAYED_BACKLIGHT_INIT
234 #endif
235 
236 /**
237  * I2C Panels
238  */
239 
240 #if EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
241 
242  #define LCD_I2C_TYPE_PCF8575
243  #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
244 
245  #if ENABLED(LCD_SAINSMART_I2C_2004)
246  #define LCD_WIDTH 20
247  #define LCD_HEIGHT 4
248  #endif
249 
250 #elif ENABLED(LCD_I2C_PANELOLU2)
251 
252  // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
253 
254  #define LCD_I2C_TYPE_MCP23017
255  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
256  #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
257  #define IS_ULTIPANEL
258 
259 #elif ENABLED(LCD_I2C_VIKI)
260 
261  /**
262  * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
263  *
264  * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
265  * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
266  * Note: The pause/stop/resume LCD button pin should be connected to the Arduino
267  * BTN_ENC pin (or set BTN_ENC to -1 if not used)
268  */
269  #define LCD_I2C_TYPE_MCP23017
270  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
271  #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
272  #define IS_ULTIPANEL
273 
274  #define ENCODER_FEEDRATE_DEADZONE 4
275 
276  #define STD_ENCODER_PULSES_PER_STEP 1
277  #define STD_ENCODER_STEPS_PER_MENU_ITEM 2
278 
279 #elif ENABLED(G3D_PANEL)
280 
281  #define STD_ENCODER_PULSES_PER_STEP 2
282  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
283 
284 #elif ANY(REPRAP_DISCOUNT_SMART_CONTROLLER, miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2)
285 
286  #define STD_ENCODER_PULSES_PER_STEP 4
287  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
288 
289 #endif
290 
291 #ifndef STD_ENCODER_PULSES_PER_STEP
292  #if ENABLED(TOUCH_BUTTONS)
293  #define STD_ENCODER_PULSES_PER_STEP 1
294  #else
295  #define STD_ENCODER_PULSES_PER_STEP 5
296  #endif
297 #endif
298 #ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
299  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
300 #endif
301 #ifndef ENCODER_PULSES_PER_STEP
302  #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
303 #endif
304 #ifndef ENCODER_STEPS_PER_MENU_ITEM
305  #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
306 #endif
307 #ifndef ENCODER_FEEDRATE_DEADZONE
308  #define ENCODER_FEEDRATE_DEADZONE 6
309 #endif
310 
311 // Shift register panels
312 // ---------------------
313 // 2 wire Non-latching LCD SR from:
314 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
315 #if ENABLED(FF_INTERFACEBOARD)
316  #define SR_LCD_3W_NL // Non latching 3 wire shift register
317  #define IS_ULTIPANEL
318 #elif ENABLED(SAV_3DLCD)
319  #define SR_LCD_2W_NL // Non latching 2 wire shift register
320  #define IS_ULTIPANEL
321 #endif
322 
323 #if ENABLED(IS_ULTIPANEL)
324  #define ULTIPANEL
325 #endif
326 #if ENABLED(ULTIPANEL)
327  #define IS_ULTRA_LCD
328  #ifndef NEWPANEL
329  #define NEWPANEL
330  #endif
331 #endif
332 
333 #if ENABLED(IS_ULTRA_LCD)
334  #define ULTRA_LCD
335 #endif
336 
337 #if ENABLED(IS_RRW_KEYPAD)
338  #define REPRAPWORLD_KEYPAD
339 #endif
340 
341 // Keypad needs a move step
342 #if ENABLED(REPRAPWORLD_KEYPAD)
343  #define NEWPANEL
344  #ifndef REPRAPWORLD_KEYPAD_MOVE_STEP
345  #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
346  #endif
347 #endif
348 
349 // Extensible UI serial touch screens. (See src/lcd/extensible_ui)
350 #if ANY(MALYAN_LCD, DGUS_LCD, LULZBOT_TOUCH_UI)
351  #define IS_EXTUI
352  #define EXTENSIBLE_UI
353 #endif
354 
355 // Aliases for LCD features
356 #define HAS_SPI_LCD ENABLED(ULTRA_LCD)
357 #define HAS_DISPLAY (HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI))
358 #define HAS_GRAPHICAL_LCD ENABLED(DOGLCD)
359 #define HAS_CHARACTER_LCD (HAS_SPI_LCD && !HAS_GRAPHICAL_LCD)
360 #define HAS_LCD_MENU (ENABLED(ULTIPANEL) && DISABLED(NO_LCD_MENUS))
361 #define HAS_ADC_BUTTONS ENABLED(ADC_KEYPAD)
362 
363 /**
364  * Extruders have some combination of stepper motors and hotends
365  * so we separate these concepts into the defines:
366  *
367  * EXTRUDERS - Number of Selectable Tools
368  * HOTENDS - Number of hotends, whether connected or separate
369  * E_STEPPERS - Number of actual E stepper motors
370  * E_MANUAL - Number of E steppers for LCD move options
371  *
372  */
373 
374 #if EXTRUDERS == 0
375  #undef DISTINCT_E_FACTORS
376  #undef SINGLENOZZLE
377  #undef SWITCHING_EXTRUDER
378  #undef SWITCHING_NOZZLE
379  #undef MIXING_EXTRUDER
380  #undef MK2_MULTIPLEXER
381  #undef PRUSA_MMU2
382 #endif
383 
384 #if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
385  #if EXTRUDERS > 4
386  #define E_STEPPERS 3
387  #elif EXTRUDERS > 2
388  #define E_STEPPERS 2
389  #else
390  #define E_STEPPERS 1
391  #endif
392  #if DISABLED(SWITCHING_NOZZLE)
393  #define HOTENDS E_STEPPERS
394  #endif
395 #elif ENABLED(MIXING_EXTRUDER)
396  #define E_STEPPERS MIXING_STEPPERS
397  #define E_MANUAL 1
398  #define DUAL_MIXING_EXTRUDER (MIXING_STEPPERS == 2)
399 #elif ENABLED(SWITCHING_TOOLHEAD)
400  #define E_STEPPERS EXTRUDERS
401  #define E_MANUAL EXTRUDERS
402 #elif ENABLED(PRUSA_MMU2)
403  #define E_STEPPERS 1
404 #endif
405 
406 // No inactive extruders with MK2_MULTIPLEXER or SWITCHING_NOZZLE
407 #if EITHER(MK2_MULTIPLEXER, SWITCHING_NOZZLE)
408  #undef DISABLE_INACTIVE_EXTRUDER
409 #endif
410 
411 // Prusa MK2 Multiplexer and MMU 2.0 force SINGLENOZZLE
412 #if EITHER(MK2_MULTIPLEXER, PRUSA_MMU2)
413  #define SINGLENOZZLE
414 #endif
415 
416 #if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
417  #undef HOTENDS
418  #define HOTENDS 1
419  #undef TEMP_SENSOR_1_AS_REDUNDANT
420  #undef HOTEND_OFFSET_X
421  #undef HOTEND_OFFSET_Y
422 #endif
423 
424 #ifndef HOTENDS
425  #define HOTENDS EXTRUDERS
426 #endif
427 
428 #ifndef E_STEPPERS
429  #define E_STEPPERS EXTRUDERS
430 #endif
431 
432 #ifndef E_MANUAL
433  #define E_MANUAL EXTRUDERS
434 #endif
435 
436 #define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
437 
438 #define DO_SWITCH_EXTRUDER (ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR))
439 #define SWITCHING_NOZZLE_TWO_SERVOS defined(SWITCHING_NOZZLE_E1_SERVO_NR)
440 
441 #define HAS_HOTEND_OFFSET (HOTENDS > 1)
442 #define HAS_DUPLICATION_MODE EITHER(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION)
443 
444 /**
445  * DISTINCT_E_FACTORS affects how some E factors are accessed
446  */
447 #if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
448  #define XYZE_N (XYZ + E_STEPPERS)
449  #define E_AXIS_N(E) AxisEnum(E_AXIS + E)
450  #define UNUSED_E(E) NOOP
451 #else
452  #undef DISTINCT_E_FACTORS
453  #define XYZE_N XYZE
454  #define E_AXIS_N(E) E_AXIS
455  #define UNUSED_E(E) UNUSED(E)
456 #endif
457 
458 /**
459  * The BLTouch Probe emulates a servo probe
460  * and uses "special" angles for its state.
461  */
462 #if ENABLED(BLTOUCH)
463  #ifndef Z_PROBE_SERVO_NR
464  #define Z_PROBE_SERVO_NR 0
465  #endif
466  #ifndef NUM_SERVOS
467  #define NUM_SERVOS (Z_PROBE_SERVO_NR + 1)
468  #endif
469  #undef DEACTIVATE_SERVOS_AFTER_MOVE
470  #if NUM_SERVOS == 1
471  #undef SERVO_DELAY
472  #define SERVO_DELAY { 50 }
473  #endif
474 
475  // Always disable probe pin inverting for BLTouch
476  #undef Z_MIN_PROBE_ENDSTOP_INVERTING
477  #define Z_MIN_PROBE_ENDSTOP_INVERTING false
478  #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
479  #undef Z_MIN_ENDSTOP_INVERTING
480  #define Z_MIN_ENDSTOP_INVERTING false
481  #endif
482 #endif
483 
484 #ifndef PREHEAT_1_LABEL
485  #define PREHEAT_1_LABEL "PLA"
486 #endif
487 
488 #ifndef PREHEAT_2_LABEL
489  #define PREHEAT_2_LABEL "ABS"
490 #endif
491 
492 /**
493  * Set a flag for a servo probe
494  */
495 #define HAS_Z_SERVO_PROBE (defined(Z_PROBE_SERVO_NR) && Z_PROBE_SERVO_NR >= 0)
496 
497 /**
498  * Set flags for enabled probes
499  */
500 #define HAS_BED_PROBE (HAS_Z_SERVO_PROBE || ANY(FIX_MOUNTED_PROBE, TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE))
501 #define PROBE_SELECTED (HAS_BED_PROBE || EITHER(PROBE_MANUALLY, MESH_BED_LEVELING))
502 
503 #if HAS_BED_PROBE
504  #define HAS_CUSTOM_PROBE_PIN DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
505  #define HOMING_Z_WITH_PROBE (Z_HOME_DIR < 0 && !HAS_CUSTOM_PROBE_PIN)
506  #ifndef Z_PROBE_LOW_POINT
507  #define Z_PROBE_LOW_POINT -5
508  #endif
509  #if ENABLED(Z_PROBE_ALLEN_KEY)
510  #define PROBE_TRIGGERED_WHEN_STOWED_TEST // Extra test for Allen Key Probe
511  #endif
512  #ifdef MULTIPLE_PROBING
513  #if EXTRA_PROBING
514  #define TOTAL_PROBING (MULTIPLE_PROBING + EXTRA_PROBING)
515  #else
516  #define TOTAL_PROBING MULTIPLE_PROBING
517  #endif
518  #endif
519 #else
520  // Clear probe pin settings when no probe is selected
521  #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
522 #endif
523 
524 #ifdef GRID_MAX_POINTS_X
525  #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
526 #endif
527 
528 #define HAS_SOFTWARE_ENDSTOPS EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
529 #define HAS_RESUME_CONTINUE ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER)
530 #define HAS_COLOR_LEDS ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
531 #define HAS_LEDS_OFF_FLAG (BOTH(PRINTER_EVENT_LEDS, SDSUPPORT) && HAS_RESUME_CONTINUE)
532 #define HAS_PRINT_PROGRESS EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
533 #define HAS_PRINT_PROGRESS_PERMYRIAD (HAS_PRINT_PROGRESS && EITHER(PRINT_PROGRESS_SHOW_DECIMALS, SHOW_REMAINING_TIME))
534 #define HAS_SERVICE_INTERVALS (ENABLED(PRINTCOUNTER) && (SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0))
535 #define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR)
536 
537 #define Z_MULTI_STEPPER_DRIVERS EITHER(Z_DUAL_STEPPER_DRIVERS, Z_TRIPLE_STEPPER_DRIVERS)
538 #define Z_MULTI_ENDSTOPS EITHER(Z_DUAL_ENDSTOPS, Z_TRIPLE_ENDSTOPS)
539 #define HAS_EXTRA_ENDSTOPS (EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS)
540 
541 #define HAS_GAMES ANY(MARLIN_BRICKOUT, MARLIN_INVADERS, MARLIN_SNAKE, MARLIN_MAZE)
542 #define HAS_GAME_MENU (1 < ENABLED(MARLIN_BRICKOUT) + ENABLED(MARLIN_INVADERS) + ENABLED(MARLIN_SNAKE) + ENABLED(MARLIN_MAZE))
543 
544 #define IS_SCARA ENABLED(MORGAN_SCARA)
545 #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
546 #define IS_CARTESIAN !IS_KINEMATIC
547 
548 #ifndef INVERT_X_DIR
549  #define INVERT_X_DIR false
550 #endif
551 #ifndef INVERT_Y_DIR
552  #define INVERT_Y_DIR false
553 #endif
554 #ifndef INVERT_Z_DIR
555  #define INVERT_Z_DIR false
556 #endif
557 #ifndef INVERT_E_DIR
558  #define INVERT_E_DIR false
559 #endif
560 
561 #if ENABLED(SLIM_LCD_MENUS)
562  #define BOOT_MARLIN_LOGO_SMALL
563 #endif
564 
565 #define IS_RE_ARM_BOARD MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
566 
567 #define HAS_SDCARD_CONNECTION EITHER(TARGET_LPC1768, ADAFRUIT_GRAND_CENTRAL_M4)
568 
569 #define HAS_LINEAR_E_JERK (DISABLED(CLASSIC_JERK) && ENABLED(LIN_ADVANCE))
570 
571 #ifndef SPI_SPEED
572  #define SPI_SPEED SPI_FULL_SPEED
573 #endif