My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Conditionals_LCD.h 27KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 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 <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * Conditionals_LCD.h
  25. * Conditionals that need to be set before Configuration_adv.h or pins.h
  26. */
  27. // Kinematics
  28. #if ENABLED(MORGAN_SCARA)
  29. #define IS_SCARA 1
  30. #define IS_KINEMATIC 1
  31. #elif ENABLED(DELTA)
  32. #define IS_KINEMATIC 1
  33. #else
  34. #define IS_CARTESIAN 1
  35. #endif
  36. // MKS_LCD12864 is a variant of MKS_MINI_12864
  37. #if ENABLED(MKS_LCD12864)
  38. #define MKS_MINI_12864
  39. #endif
  40. /**
  41. * General Flags that may be set below by specific LCDs
  42. *
  43. * DOGLCD : Run a Graphical LCD through U8GLib (with MarlinUI)
  44. * IS_ULTIPANEL : Define LCD_PINS_D5/6/7 for direct-connected "Ultipanel" LCDs
  45. * IS_ULTRA_LCD : Ultra LCD, not necessarily Ultipanel.
  46. * IS_RRD_SC : Common RRD Smart Controller digital interface pins
  47. * IS_RRD_FG_SC : Common RRD Full Graphical Smart Controller digital interface pins
  48. * U8GLIB_ST7920 : Most common DOGM display SPI interface, supporting a "lightweight" display mode.
  49. * U8GLIB_SH1106 : SH1106 OLED with I2C interface via U8GLib
  50. * IS_U8GLIB_SSD1306 : SSD1306 OLED with I2C interface via U8GLib
  51. * U8GLIB_SSD1309 : SSD1309 OLED with I2C interface via U8GLib
  52. * U8GLIB_ST7565_64128N : ST7565 128x64 LCD with SPI interface via U8GLib
  53. * U8GLIB_LM6059_AF : LM6059 with Hardware SPI via U8GLib
  54. */
  55. #if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
  56. #define MINIPANEL
  57. #elif ENABLED(CARTESIO_UI)
  58. #define DOGLCD
  59. #define IS_ULTIPANEL 1
  60. #elif EITHER(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE)
  61. #define IS_DWIN_MARLINUI 1
  62. #define IS_ULTIPANEL 1
  63. #elif ENABLED(ZONESTAR_LCD)
  64. #define HAS_ADC_BUTTONS 1
  65. #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
  66. #define ADC_KEY_NUM 8
  67. #define IS_ULTIPANEL 1
  68. // This helps to implement HAS_ADC_BUTTONS menus
  69. #define REVERSE_MENU_DIRECTION
  70. #define ENCODER_PULSES_PER_STEP 1
  71. #define ENCODER_STEPS_PER_MENU_ITEM 1
  72. #define ENCODER_FEEDRATE_DEADZONE 2
  73. #elif ENABLED(ZONESTAR_12864LCD)
  74. #define DOGLCD
  75. #define IS_RRD_SC 1
  76. #define U8GLIB_ST7920
  77. #elif ENABLED(ZONESTAR_12864OLED)
  78. #define IS_RRD_SC 1
  79. #define U8GLIB_SH1106
  80. #elif ENABLED(ZONESTAR_12864OLED_SSD1306)
  81. #define IS_RRD_SC 1
  82. #define IS_U8GLIB_SSD1306
  83. #elif ENABLED(RADDS_DISPLAY)
  84. #define IS_ULTIPANEL 1
  85. #define ENCODER_PULSES_PER_STEP 2
  86. #elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
  87. #define DOGLCD
  88. #define IS_ULTIPANEL 1
  89. #if ENABLED(miniVIKI)
  90. #define U8GLIB_ST7565_64128N
  91. #elif ENABLED(VIKI2)
  92. #define U8GLIB_ST7565_64128N
  93. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  94. #define U8GLIB_LM6059_AF
  95. #elif ENABLED(AZSMZ_12864)
  96. #define U8GLIB_ST7565_64128N
  97. #endif
  98. #elif ENABLED(OLED_PANEL_TINYBOY2)
  99. #define IS_U8GLIB_SSD1306
  100. #define IS_ULTIPANEL 1
  101. #elif ENABLED(RA_CONTROL_PANEL)
  102. #define LCD_I2C_TYPE_PCA8574
  103. #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
  104. #define IS_ULTIPANEL 1
  105. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  106. #define DOGLCD
  107. #define U8GLIB_ST7920
  108. #define IS_ULTIPANEL 1
  109. #elif ENABLED(MKS_12864OLED)
  110. #define IS_RRD_SC 1
  111. #define U8GLIB_SH1106
  112. #elif ENABLED(MKS_12864OLED_SSD1306)
  113. #define IS_RRD_SC 1
  114. #define IS_U8GLIB_SSD1306
  115. #elif ENABLED(FYSETC_242_OLED_12864)
  116. #define IS_RRD_SC 1
  117. #define U8GLIB_SH1106
  118. #define LED_CONTROL_MENU
  119. #define NEOPIXEL_LED
  120. #undef NEOPIXEL_TYPE
  121. #define NEOPIXEL_TYPE NEO_RGB
  122. #if NEOPIXEL_PIXELS < 3
  123. #undef NEOPIXELS_PIXELS
  124. #define NEOPIXEL_PIXELS 3
  125. #endif
  126. #ifndef NEOPIXEL_BRIGHTNESS
  127. #define NEOPIXEL_BRIGHTNESS 127
  128. #endif
  129. #if ENABLED(PSU_CONTROL)
  130. #define LED_BACKLIGHT_TIMEOUT 10000
  131. #endif
  132. #elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1)
  133. #define FYSETC_MINI_12864
  134. #define DOGLCD
  135. #define IS_ULTIPANEL 1
  136. #define LED_COLORS_REDUCE_GREEN
  137. #if ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
  138. #define LED_BACKLIGHT_TIMEOUT 10000
  139. #endif
  140. // Require LED backlighting enabled
  141. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  142. #define RGB_LED
  143. #elif ENABLED(FYSETC_MINI_12864_2_1)
  144. #define LED_CONTROL_MENU
  145. #define NEOPIXEL_LED
  146. #undef NEOPIXEL_TYPE
  147. #define NEOPIXEL_TYPE NEO_RGB
  148. #if NEOPIXEL_PIXELS < 3
  149. #undef NEOPIXELS_PIXELS
  150. #define NEOPIXEL_PIXELS 3
  151. #endif
  152. #ifndef NEOPIXEL_BRIGHTNESS
  153. #define NEOPIXEL_BRIGHTNESS 127
  154. #endif
  155. //#define NEOPIXEL_STARTUP_TEST
  156. #endif
  157. #elif ENABLED(ULTI_CONTROLLER)
  158. #define IS_ULTIPANEL 1
  159. #define U8GLIB_SSD1309
  160. #define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin
  161. #define ENCODER_PULSES_PER_STEP 2
  162. #define ENCODER_STEPS_PER_MENU_ITEM 2
  163. #elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
  164. #define IS_RRD_SC 1
  165. #define LCD_WIDTH 16
  166. #define LCD_HEIGHT 2
  167. #elif EITHER(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C)
  168. #define IS_TFTGLCD_PANEL 1
  169. #define IS_ULTIPANEL 1 // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD
  170. #if ENABLED(SDSUPPORT) && DISABLED(LCD_PROGRESS_BAR)
  171. #define LCD_PROGRESS_BAR
  172. #endif
  173. #if ENABLED(TFTGLCD_PANEL_I2C)
  174. #define LCD_I2C_ADDRESS 0x27 // Must be equal to panel's I2C slave addres
  175. #endif
  176. #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD, used for both I2C and SPI buses (LiquidTWI2 not required)
  177. #define STD_ENCODER_PULSES_PER_STEP 2
  178. #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
  179. #define LCD_WIDTH 20 // 20 or 24 chars in line
  180. #define LCD_HEIGHT 10 // Character lines
  181. #define LCD_CONTRAST_MIN 127
  182. #define LCD_CONTRAST_MAX 255
  183. #define DEFAULT_LCD_CONTRAST 250
  184. #define CONVERT_TO_EXT_ASCII // Use extended 128-255 symbols from ASCII table.
  185. // At this time present conversion only for cyrillic - bg, ru and uk languages.
  186. // First 7 ASCII symbols in panel font must be replaced with Marlin's special symbols.
  187. #elif ENABLED(CR10_STOCKDISPLAY)
  188. #define IS_RRD_FG_SC 1
  189. #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
  190. #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
  191. #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
  192. #elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER)
  193. #define IS_RRD_FG_SC 1
  194. #elif ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
  195. // RepRapDiscount LCD or Graphical LCD with rotary click encoder
  196. #define IS_RRD_SC 1
  197. #endif
  198. // ST7920-based graphical displays
  199. #if ANY(IS_RRD_FG_SC, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
  200. #define DOGLCD
  201. #define U8GLIB_ST7920
  202. #define IS_RRD_SC 1
  203. #endif
  204. // ST7565 / 64128N graphical displays
  205. #if EITHER(MAKRPANEL, MINIPANEL)
  206. #define IS_ULTIPANEL 1
  207. #define DOGLCD
  208. #if ENABLED(MAKRPANEL)
  209. #define U8GLIB_ST7565_64128N
  210. #endif
  211. #endif
  212. #if ENABLED(IS_U8GLIB_SSD1306)
  213. #define U8GLIB_SSD1306
  214. #endif
  215. #if ENABLED(OVERLORD_OLED)
  216. #define IS_ULTIPANEL 1
  217. #define U8GLIB_SH1106
  218. /**
  219. * PCA9632 for buzzer and LEDs via i2c
  220. * No auto-inc, red and green leds switched, buzzer
  221. */
  222. #define PCA9632
  223. #define PCA9632_NO_AUTO_INC
  224. #define PCA9632_GRN 0x00
  225. #define PCA9632_RED 0x02
  226. #define PCA9632_BUZZER
  227. #define PCA9632_BUZZER_DATA { 0x09, 0x02 }
  228. #define ENCODER_PULSES_PER_STEP 1 // Overlord uses buttons
  229. #define ENCODER_STEPS_PER_MENU_ITEM 1
  230. #endif
  231. // 128x64 I2C OLED LCDs - SSD1306/SSD1309/SH1106
  232. #if ANY(U8GLIB_SSD1306, U8GLIB_SSD1309, U8GLIB_SH1106)
  233. #define HAS_U8GLIB_I2C_OLED 1
  234. #define IS_ULTRA_LCD 1
  235. #define DOGLCD
  236. #endif
  237. /**
  238. * SPI Ultipanels
  239. */
  240. // Basic Ultipanel-like displays
  241. #if ANY(ULTIMAKERCONTROLLER, IS_RRD_SC, G3D_PANEL, RIGIDBOT_PANEL, PANEL_ONE, U8GLIB_SH1106)
  242. #define IS_ULTIPANEL 1
  243. #endif
  244. // Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h
  245. #if ENABLED(U8GLIB_SH1106_EINSTART)
  246. #define DOGLCD
  247. #define IS_ULTIPANEL 1
  248. #endif
  249. // TFT Compatibility
  250. #if ANY(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT, TFT_320x240, TFT_480x320, TFT_320x240_SPI, TFT_480x320_SPI, TFT_LVGL_UI_FSMC, TFT_LVGL_UI_SPI)
  251. #define IS_LEGACY_TFT 1
  252. #define TFT_GENERIC
  253. #warning "Don't forget to update your TFT settings in Configuration.h."
  254. #endif
  255. #if ANY(FSMC_GRAPHICAL_TFT, TFT_320x240, TFT_480x320, TFT_LVGL_UI_FSMC)
  256. #define TFT_INTERFACE_FSMC
  257. #elif ANY(SPI_GRAPHICAL_TFT, TFT_320x240_SPI, TFT_480x320_SPI, TFT_LVGL_UI_SPI)
  258. #define TFT_INTERFACE_SPI
  259. #endif
  260. #if EITHER(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT)
  261. #define TFT_CLASSIC_UI
  262. #elif ANY(TFT_320x240, TFT_480x320, TFT_320x240_SPI, TFT_480x320_SPI)
  263. #define TFT_COLOR_UI
  264. #elif EITHER(TFT_LVGL_UI_FSMC, TFT_LVGL_UI_SPI)
  265. #define TFT_LVGL_UI
  266. #endif
  267. // FSMC/SPI TFT Panels (LVGL)
  268. #if ENABLED(TFT_LVGL_UI)
  269. #define HAS_TFT_LVGL_UI 1
  270. #endif
  271. // FSMC/SPI TFT Panels
  272. #if ENABLED(TFT_CLASSIC_UI)
  273. #define TFT_SCALED_DOGLCD 1
  274. #endif
  275. #if TFT_SCALED_DOGLCD
  276. #define DOGLCD
  277. #define IS_ULTIPANEL 1
  278. #define DELAYED_BACKLIGHT_INIT
  279. #elif HAS_TFT_LVGL_UI
  280. #define DELAYED_BACKLIGHT_INIT
  281. #endif
  282. // Color UI
  283. #if ENABLED(TFT_COLOR_UI)
  284. #define HAS_GRAPHICAL_TFT 1
  285. #define IS_ULTIPANEL 1
  286. #endif
  287. /**
  288. * I2C Panels
  289. */
  290. #if EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
  291. #define LCD_I2C_TYPE_PCF8575
  292. #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
  293. #if ENABLED(LCD_SAINSMART_I2C_2004)
  294. #define LCD_WIDTH 20
  295. #define LCD_HEIGHT 4
  296. #endif
  297. #elif ENABLED(LCD_I2C_PANELOLU2)
  298. // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
  299. #define LCD_I2C_TYPE_MCP23017
  300. #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  301. #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
  302. #define IS_ULTIPANEL 1
  303. #elif ENABLED(LCD_I2C_VIKI)
  304. /**
  305. * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
  306. *
  307. * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
  308. * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
  309. * Note: The pause/stop/resume LCD button pin should be connected to the Arduino
  310. * BTN_ENC pin (or set BTN_ENC to -1 if not used)
  311. */
  312. #define LCD_I2C_TYPE_MCP23017
  313. #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  314. #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
  315. #define IS_ULTIPANEL 1
  316. #define ENCODER_FEEDRATE_DEADZONE 4
  317. #define STD_ENCODER_PULSES_PER_STEP 1
  318. #define STD_ENCODER_STEPS_PER_MENU_ITEM 2
  319. #elif ENABLED(G3D_PANEL)
  320. #define STD_ENCODER_PULSES_PER_STEP 2
  321. #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
  322. #elif ANY(IS_RRD_SC, miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2)
  323. #define STD_ENCODER_PULSES_PER_STEP 4
  324. #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
  325. #endif
  326. #ifndef STD_ENCODER_PULSES_PER_STEP
  327. #if ENABLED(TOUCH_SCREEN)
  328. #define STD_ENCODER_PULSES_PER_STEP 2
  329. #else
  330. #define STD_ENCODER_PULSES_PER_STEP 5
  331. #endif
  332. #endif
  333. #ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
  334. #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
  335. #endif
  336. #ifndef ENCODER_PULSES_PER_STEP
  337. #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
  338. #endif
  339. #ifndef ENCODER_STEPS_PER_MENU_ITEM
  340. #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
  341. #endif
  342. #ifndef ENCODER_FEEDRATE_DEADZONE
  343. #define ENCODER_FEEDRATE_DEADZONE 6
  344. #endif
  345. // Shift register panels
  346. // ---------------------
  347. // 2 wire Non-latching LCD SR from:
  348. // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
  349. #if ENABLED(FF_INTERFACEBOARD)
  350. #define SR_LCD_3W_NL // Non latching 3 wire shift register
  351. #define IS_ULTIPANEL 1
  352. #elif ENABLED(SAV_3DLCD)
  353. #define SR_LCD_2W_NL // Non latching 2 wire shift register
  354. #define IS_ULTIPANEL 1
  355. #elif ENABLED(ULTIPANEL)
  356. #define IS_ULTIPANEL 1
  357. #endif
  358. #if EITHER(IS_ULTIPANEL, ULTRA_LCD)
  359. #define IS_ULTRA_LCD 1
  360. #endif
  361. #if EITHER(IS_ULTIPANEL, REPRAPWORLD_KEYPAD)
  362. #define IS_NEWPANEL 1
  363. #endif
  364. #if EITHER(ZONESTAR_LCD, REPRAPWORLD_KEYPAD)
  365. #define IS_RRW_KEYPAD 1
  366. #ifndef REPRAPWORLD_KEYPAD_MOVE_STEP
  367. #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
  368. #endif
  369. #endif
  370. // Aliases for LCD features
  371. #if ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
  372. #define HAS_DGUS_LCD 1
  373. #endif
  374. // Extensible UI serial touch screens. (See src/lcd/extui)
  375. #if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
  376. #define IS_EXTUI 1
  377. #define EXTENSIBLE_UI
  378. #endif
  379. // Aliases for LCD features
  380. #if EITHER(IS_ULTRA_LCD, EXTENSIBLE_UI)
  381. #define HAS_DISPLAY 1
  382. #endif
  383. #if IS_ULTRA_LCD
  384. #define HAS_WIRED_LCD 1
  385. #if ENABLED(DOGLCD)
  386. #define HAS_MARLINUI_U8GLIB 1
  387. #elif IS_TFTGLCD_PANEL
  388. // Neither DOGM nor HD44780. Fully customized interface.
  389. #elif DISABLED(HAS_GRAPHICAL_TFT)
  390. #define HAS_MARLINUI_HD44780 1
  391. #endif
  392. #endif
  393. #if IS_ULTIPANEL && DISABLED(NO_LCD_MENUS)
  394. #define HAS_LCD_MENU 1
  395. #endif
  396. #if HAS_MARLINUI_U8GLIB
  397. #ifndef LCD_PIXEL_WIDTH
  398. #define LCD_PIXEL_WIDTH 128
  399. #endif
  400. #ifndef LCD_PIXEL_HEIGHT
  401. #define LCD_PIXEL_HEIGHT 64
  402. #endif
  403. #endif
  404. /**
  405. * Extruders have some combination of stepper motors and hotends
  406. * so we separate these concepts into the defines:
  407. *
  408. * EXTRUDERS - Number of Selectable Tools
  409. * HOTENDS - Number of hotends, whether connected or separate
  410. * E_STEPPERS - Number of actual E stepper motors
  411. * E_MANUAL - Number of E steppers for LCD move options
  412. */
  413. #if EXTRUDERS == 0
  414. #undef EXTRUDERS
  415. #define EXTRUDERS 0
  416. #undef SINGLENOZZLE
  417. #undef SWITCHING_EXTRUDER
  418. #undef SWITCHING_NOZZLE
  419. #undef MIXING_EXTRUDER
  420. #undef MK2_MULTIPLEXER
  421. #undef PRUSA_MMU2
  422. #undef HOTEND_IDLE_TIMEOUT
  423. #elif EXTRUDERS > 1
  424. #define HAS_MULTI_EXTRUDER 1
  425. #endif
  426. #if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
  427. #if EXTRUDERS > 4
  428. #define E_STEPPERS 3
  429. #elif EXTRUDERS > 2
  430. #define E_STEPPERS 2
  431. #else
  432. #define E_STEPPERS 1
  433. #endif
  434. #if DISABLED(SWITCHING_NOZZLE)
  435. #define HOTENDS E_STEPPERS
  436. #endif
  437. #elif ENABLED(MIXING_EXTRUDER)
  438. #define E_STEPPERS MIXING_STEPPERS
  439. #define E_MANUAL 1
  440. #if MIXING_STEPPERS == 2
  441. #define HAS_DUAL_MIXING 1
  442. #endif
  443. #elif ENABLED(SWITCHING_TOOLHEAD)
  444. #define E_STEPPERS EXTRUDERS
  445. #define E_MANUAL EXTRUDERS
  446. #elif ENABLED(PRUSA_MMU2)
  447. #define E_STEPPERS 1
  448. #endif
  449. // No inactive extruders with MK2_MULTIPLEXER or SWITCHING_NOZZLE
  450. #if EITHER(MK2_MULTIPLEXER, SWITCHING_NOZZLE)
  451. #undef DISABLE_INACTIVE_EXTRUDER
  452. #endif
  453. // Průša MK2 Multiplexer and MMU 2.0 force SINGLENOZZLE
  454. #if EITHER(MK2_MULTIPLEXER, PRUSA_MMU2)
  455. #define SINGLENOZZLE
  456. #endif
  457. #if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
  458. #undef HOTENDS
  459. #define HOTENDS 1
  460. #undef HOTEND_OFFSET_X
  461. #undef HOTEND_OFFSET_Y
  462. #endif
  463. #ifndef HOTENDS
  464. #define HOTENDS EXTRUDERS
  465. #endif
  466. #ifndef E_STEPPERS
  467. #define E_STEPPERS EXTRUDERS
  468. #endif
  469. #ifndef E_MANUAL
  470. #define E_MANUAL EXTRUDERS
  471. #endif
  472. #if HOTENDS
  473. #define HAS_HOTEND 1
  474. #ifndef HOTEND_OVERSHOOT
  475. #define HOTEND_OVERSHOOT 15
  476. #endif
  477. #if HOTENDS > 1
  478. #define HAS_MULTI_HOTEND 1
  479. #define HAS_HOTEND_OFFSET 1
  480. #endif
  481. #else
  482. #undef PID_PARAMS_PER_HOTEND
  483. #endif
  484. // Helper macros for extruder and hotend arrays
  485. #define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
  486. #define ARRAY_BY_EXTRUDERS(V...) ARRAY_N(EXTRUDERS, V)
  487. #define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1, v1, v1)
  488. #define ARRAY_BY_HOTENDS(V...) ARRAY_N(HOTENDS, V)
  489. #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1, v1, v1)
  490. #if ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR)
  491. #define DO_SWITCH_EXTRUDER 1
  492. #endif
  493. /**
  494. * Default hotend offsets, if not defined
  495. */
  496. #if HAS_HOTEND_OFFSET
  497. #ifndef HOTEND_OFFSET_X
  498. #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder
  499. #endif
  500. #ifndef HOTEND_OFFSET_Y
  501. #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder
  502. #endif
  503. #ifndef HOTEND_OFFSET_Z
  504. #define HOTEND_OFFSET_Z { 0 } // Z offsets for each extruder
  505. #endif
  506. #endif
  507. /**
  508. * DISTINCT_E_FACTORS affects how some E factors are accessed
  509. */
  510. #if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
  511. #define DISTINCT_E E_STEPPERS
  512. #define XYZE_N (XYZ + E_STEPPERS)
  513. #define E_INDEX_N(E) (E)
  514. #define E_AXIS_N(E) AxisEnum(E_AXIS + E)
  515. #define UNUSED_E(E) NOOP
  516. #else
  517. #undef DISTINCT_E_FACTORS
  518. #define DISTINCT_E 1
  519. #define XYZE_N XYZE
  520. #define E_INDEX_N(E) 0
  521. #define E_AXIS_N(E) E_AXIS
  522. #define UNUSED_E(E) UNUSED(E)
  523. #endif
  524. #if ENABLED(DWIN_CREALITY_LCD)
  525. #define SERIAL_CATCHALL 0
  526. #endif
  527. // Pressure sensor with a BLTouch-like interface
  528. #if ENABLED(CREALITY_TOUCH)
  529. #define BLTOUCH
  530. #endif
  531. /**
  532. * The BLTouch Probe emulates a servo probe
  533. * and uses "special" angles for its state.
  534. */
  535. #if ENABLED(BLTOUCH)
  536. #ifndef Z_PROBE_SERVO_NR
  537. #define Z_PROBE_SERVO_NR 0
  538. #endif
  539. #undef DEACTIVATE_SERVOS_AFTER_MOVE
  540. // Always disable probe pin inverting for BLTouch
  541. #undef Z_MIN_PROBE_ENDSTOP_INVERTING
  542. #define Z_MIN_PROBE_ENDSTOP_INVERTING false
  543. #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
  544. #undef Z_MIN_ENDSTOP_INVERTING
  545. #define Z_MIN_ENDSTOP_INVERTING false
  546. #endif
  547. #endif
  548. /**
  549. * Set a flag for a servo probe (or BLTouch)
  550. */
  551. #ifdef Z_PROBE_SERVO_NR
  552. #define HAS_Z_SERVO_PROBE 1
  553. #endif
  554. #if ANY(HAS_Z_SERVO_PROBE, SWITCHING_EXTRUDER, SWITCHING_NOZZLE)
  555. #define HAS_SERVO_ANGLES 1
  556. #endif
  557. #if !HAS_SERVO_ANGLES
  558. #undef EDITABLE_SERVO_ANGLES
  559. #endif
  560. /**
  561. * Set flags for enabled probes
  562. */
  563. #if ANY(HAS_Z_SERVO_PROBE, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE)
  564. #define HAS_BED_PROBE 1
  565. #endif
  566. #if ANY(HAS_BED_PROBE, PROBE_MANUALLY, MESH_BED_LEVELING)
  567. #define PROBE_SELECTED 1
  568. #endif
  569. #if HAS_BED_PROBE
  570. #if DISABLED(NOZZLE_AS_PROBE)
  571. #define HAS_PROBE_XY_OFFSET 1
  572. #endif
  573. #if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
  574. #define HAS_CUSTOM_PROBE_PIN 1
  575. #endif
  576. #if Z_HOME_DIR < 0 && (!HAS_CUSTOM_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING))
  577. #define HOMING_Z_WITH_PROBE 1
  578. #endif
  579. #ifndef Z_PROBE_LOW_POINT
  580. #define Z_PROBE_LOW_POINT -5
  581. #endif
  582. #if ENABLED(Z_PROBE_ALLEN_KEY)
  583. #define PROBE_TRIGGERED_WHEN_STOWED_TEST 1 // Extra test for Allen Key Probe
  584. #endif
  585. #if MULTIPLE_PROBING > 1
  586. #if EXTRA_PROBING > 0
  587. #define TOTAL_PROBING (MULTIPLE_PROBING + EXTRA_PROBING)
  588. #else
  589. #define TOTAL_PROBING MULTIPLE_PROBING
  590. #endif
  591. #endif
  592. #else
  593. // Clear probe pin settings when no probe is selected
  594. #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
  595. #endif
  596. /**
  597. * Set granular options based on the specific type of leveling
  598. */
  599. #if ENABLED(AUTO_BED_LEVELING_UBL)
  600. #undef LCD_BED_LEVELING
  601. #if ENABLED(DELTA)
  602. #define UBL_SEGMENTED 1
  603. #endif
  604. #endif
  605. #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT)
  606. #define ABL_PLANAR 1
  607. #endif
  608. #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
  609. #define ABL_GRID 1
  610. #endif
  611. #if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_3POINT)
  612. #define HAS_ABL_NOT_UBL 1
  613. #endif
  614. #if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL, MESH_BED_LEVELING)
  615. #define HAS_MESH 1
  616. #endif
  617. #if EITHER(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_3POINT)
  618. #define NEEDS_THREE_PROBE_POINTS 1
  619. #endif
  620. #if EITHER(HAS_ABL_NOT_UBL, AUTO_BED_LEVELING_UBL)
  621. #define HAS_ABL_OR_UBL 1
  622. #if DISABLED(PROBE_MANUALLY)
  623. #define HAS_AUTOLEVEL 1
  624. #endif
  625. #endif
  626. #if EITHER(HAS_ABL_OR_UBL, MESH_BED_LEVELING)
  627. #define HAS_LEVELING 1
  628. #if DISABLED(AUTO_BED_LEVELING_UBL)
  629. #define PLANNER_LEVELING 1
  630. #endif
  631. #endif
  632. #if EITHER(HAS_ABL_OR_UBL, Z_MIN_PROBE_REPEATABILITY_TEST)
  633. #define HAS_PROBING_PROCEDURE 1
  634. #endif
  635. #if !HAS_LEVELING
  636. #undef RESTORE_LEVELING_AFTER_G28
  637. #endif
  638. #ifdef GRID_MAX_POINTS_X
  639. #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
  640. #define GRID_LOOP(A,B) LOOP_L_N(A, GRID_MAX_POINTS_X) LOOP_L_N(B, GRID_MAX_POINTS_Y)
  641. #endif
  642. // Slim menu optimizations
  643. #if ENABLED(SLIM_LCD_MENUS)
  644. #define BOOT_MARLIN_LOGO_SMALL
  645. #endif
  646. // This flag indicates some kind of jerk storage is needed
  647. #if EITHER(CLASSIC_JERK, IS_KINEMATIC)
  648. #define HAS_CLASSIC_JERK 1
  649. #endif
  650. #if DISABLED(CLASSIC_JERK)
  651. #define HAS_JUNCTION_DEVIATION 1
  652. #endif
  653. // E jerk exists with JD disabled (of course) but also when Linear Advance is disabled on Delta/SCARA
  654. #if ENABLED(CLASSIC_JERK) || (IS_KINEMATIC && DISABLED(LIN_ADVANCE))
  655. #define HAS_CLASSIC_E_JERK 1
  656. #endif
  657. #if SERIAL_PORT == -1 || SERIAL_PORT_2 == -1
  658. #define HAS_USB_SERIAL 1
  659. #endif
  660. #if SERIAL_PORT_2 == -2
  661. #define HAS_ETHERNET 1
  662. #endif
  663. // Fallback Stepper Driver types that don't depend on Configuration_adv.h
  664. #ifndef X_DRIVER_TYPE
  665. #define X_DRIVER_TYPE A4988
  666. #endif
  667. #ifndef X2_DRIVER_TYPE
  668. #define X2_DRIVER_TYPE A4988
  669. #endif
  670. #ifndef Y_DRIVER_TYPE
  671. #define Y_DRIVER_TYPE A4988
  672. #endif
  673. #ifndef Y2_DRIVER_TYPE
  674. #define Y2_DRIVER_TYPE A4988
  675. #endif
  676. #ifndef Z_DRIVER_TYPE
  677. #define Z_DRIVER_TYPE A4988
  678. #endif
  679. #ifndef Z2_DRIVER_TYPE
  680. #define Z2_DRIVER_TYPE A4988
  681. #endif
  682. #ifndef Z3_DRIVER_TYPE
  683. #define Z3_DRIVER_TYPE A4988
  684. #endif
  685. #ifndef Z4_DRIVER_TYPE
  686. #define Z4_DRIVER_TYPE A4988
  687. #endif
  688. #if E_STEPPERS <= 0
  689. #undef E0_DRIVER_TYPE
  690. #elif !defined(E0_DRIVER_TYPE)
  691. #define E0_DRIVER_TYPE A4988
  692. #endif
  693. #if E_STEPPERS <= 1
  694. #undef E1_DRIVER_TYPE
  695. #elif !defined(E1_DRIVER_TYPE)
  696. #define E1_DRIVER_TYPE A4988
  697. #endif
  698. #if E_STEPPERS <= 2
  699. #undef E2_DRIVER_TYPE
  700. #elif !defined(E2_DRIVER_TYPE)
  701. #define E2_DRIVER_TYPE A4988
  702. #endif
  703. #if E_STEPPERS <= 3
  704. #undef E3_DRIVER_TYPE
  705. #elif !defined(E3_DRIVER_TYPE)
  706. #define E3_DRIVER_TYPE A4988
  707. #endif
  708. #if E_STEPPERS <= 4
  709. #undef E4_DRIVER_TYPE
  710. #elif !defined(E4_DRIVER_TYPE)
  711. #define E4_DRIVER_TYPE A4988
  712. #endif
  713. #if E_STEPPERS <= 5
  714. #undef E5_DRIVER_TYPE
  715. #elif !defined(E5_DRIVER_TYPE)
  716. #define E5_DRIVER_TYPE A4988
  717. #endif
  718. #if E_STEPPERS <= 6
  719. #undef E6_DRIVER_TYPE
  720. #elif !defined(E6_DRIVER_TYPE)
  721. #define E6_DRIVER_TYPE A4988
  722. #endif
  723. #if E_STEPPERS <= 7
  724. #undef E7_DRIVER_TYPE
  725. #elif !defined(E7_DRIVER_TYPE)
  726. #define E7_DRIVER_TYPE A4988
  727. #endif
  728. // Fallback axis inverting
  729. #ifndef INVERT_X_DIR
  730. #define INVERT_X_DIR false
  731. #endif
  732. #ifndef INVERT_Y_DIR
  733. #define INVERT_Y_DIR false
  734. #endif
  735. #ifndef INVERT_Z_DIR
  736. #define INVERT_Z_DIR false
  737. #endif
  738. #ifndef INVERT_E_DIR
  739. #define INVERT_E_DIR false
  740. #endif
  741. // Fallback SPI Speed
  742. #ifndef SPI_SPEED
  743. #define SPI_SPEED SPI_FULL_SPEED
  744. #endif
  745. /**
  746. * This setting is also used by M109 when trying to calculate
  747. * a ballpark safe margin to prevent wait-forever situation.
  748. */
  749. #ifndef EXTRUDE_MINTEMP
  750. #define EXTRUDE_MINTEMP 170
  751. #endif
  752. /**
  753. * TFT Displays
  754. *
  755. * Configure parameters for TFT displays:
  756. * - TFT_DEFAULT_ORIENTATION
  757. * - TFT_DRIVER
  758. * - TFT_WIDTH
  759. * - TFT_HEIGHT
  760. * - TFT_INTERFACE_(SPI|FSMC)
  761. * - TFT_COLOR
  762. * - GRAPHICAL_TFT_UPSCALE
  763. */
  764. #if ENABLED(MKS_TS35_V2_0)
  765. // Most common: ST7796
  766. #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY)
  767. #define TFT_RES_480x320
  768. #define TFT_INTERFACE_SPI
  769. #elif ENABLED(MKS_ROBIN_TFT24)
  770. // Most common: ST7789
  771. #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
  772. #define TFT_RES_320x240
  773. #define TFT_INTERFACE_FSMC
  774. #elif ENABLED(MKS_ROBIN_TFT28)
  775. // Most common: ST7789
  776. #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
  777. #define TFT_RES_320x240
  778. #define TFT_INTERFACE_FSMC
  779. #elif ENABLED(MKS_ROBIN_TFT32)
  780. // Most common: ST7789
  781. #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
  782. #define TFT_RES_320x240
  783. #define TFT_INTERFACE_FSMC
  784. #elif ENABLED(MKS_ROBIN_TFT35)
  785. // Most common: ILI9488
  786. #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
  787. #define TFT_RES_480x320
  788. #define TFT_INTERFACE_FSMC
  789. #elif ENABLED(MKS_ROBIN_TFT43)
  790. #define TFT_DEFAULT_ORIENTATION 0
  791. #define TFT_DRIVER SSD1963
  792. #define TFT_RES_480x272
  793. #define TFT_INTERFACE_FSMC
  794. #elif ENABLED(MKS_ROBIN_TFT_V1_1R)
  795. // ILI9328 or R61505
  796. #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
  797. #define TFT_RES_320x240
  798. #define TFT_INTERFACE_FSMC
  799. #elif EITHER(TFT_TRONXY_X5SA, ANYCUBIC_TFT35)
  800. #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
  801. #define TFT_DRIVER ILI9488
  802. #define TFT_RES_480x320
  803. #define TFT_INTERFACE_FSMC
  804. #elif ENABLED(LONGER_LK_TFT28)
  805. #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
  806. #define TFT_RES_320x240
  807. #define TFT_INTERFACE_FSMC
  808. #elif ENABLED(TFT_GENERIC)
  809. #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
  810. #if NONE(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320)
  811. #define TFT_RES_320x240
  812. #endif
  813. #if NONE(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
  814. #define TFT_INTERFACE_SPI
  815. #endif
  816. #endif
  817. #if ENABLED(TFT_RES_320x240)
  818. #define TFT_WIDTH 320
  819. #define TFT_HEIGHT 240
  820. #define GRAPHICAL_TFT_UPSCALE 2
  821. #elif ENABLED(TFT_RES_480x272)
  822. #define TFT_WIDTH 480
  823. #define TFT_HEIGHT 272
  824. #define GRAPHICAL_TFT_UPSCALE 2
  825. #elif ENABLED(TFT_RES_480x320)
  826. #define TFT_WIDTH 480
  827. #define TFT_HEIGHT 320
  828. #define GRAPHICAL_TFT_UPSCALE 3
  829. #endif
  830. // FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi).h
  831. #if ENABLED(TFT_INTERFACE_FSMC)
  832. #define HAS_FSMC_TFT 1
  833. #if TFT_SCALED_DOGLCD
  834. #define HAS_FSMC_GRAPHICAL_TFT 1
  835. #elif HAS_TFT_LVGL_UI
  836. #define HAS_TFT_LVGL_UI_FSMC 1
  837. #endif
  838. #elif ENABLED(TFT_INTERFACE_SPI)
  839. #define HAS_SPI_TFT 1
  840. #if TFT_SCALED_DOGLCD
  841. #define HAS_SPI_GRAPHICAL_TFT 1
  842. #elif HAS_TFT_LVGL_UI
  843. #define HAS_TFT_LVGL_UI_SPI 1
  844. #endif
  845. #endif
  846. #if ENABLED(TFT_COLOR_UI) && TFT_HEIGHT == 240
  847. #if ENABLED(TFT_INTERFACE_SPI)
  848. #define TFT_320x240_SPI
  849. #elif ENABLED(TFT_INTERFACE_FSMC)
  850. #define TFT_320x240
  851. #endif
  852. #elif ENABLED(TFT_COLOR_UI) && TFT_HEIGHT == 320
  853. #if ENABLED(TFT_INTERFACE_SPI)
  854. #define TFT_480x320_SPI
  855. #elif ENABLED(TFT_INTERFACE_FSMC)
  856. #define TFT_480x320
  857. #endif
  858. #endif
  859. // Fewer lines with touch buttons on-screen
  860. #if EITHER(TFT_320x240, TFT_320x240_SPI)
  861. #define HAS_UI_320x240 1
  862. #define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7)
  863. #elif EITHER(TFT_480x320, TFT_480x320_SPI)
  864. #define HAS_UI_480x320 1
  865. #define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7)
  866. #endif
  867. // This emulated DOGM has 'touch/xpt2046', not 'tft/xpt2046'
  868. #if ENABLED(TOUCH_SCREEN) && !HAS_GRAPHICAL_TFT
  869. #undef TOUCH_SCREEN
  870. #undef TOUCH_SCREEN_CALIBRATION
  871. #if !HAS_TFT_LVGL_UI
  872. #define HAS_TOUCH_XPT2046 1
  873. #endif
  874. #endif