common-dependencies.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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. /**
  23. * The purpose of this file is just include Marlin Configuration files,
  24. * to discover which FEATURES are enabled, without any HAL include.
  25. * Used by common-dependencies.py
  26. */
  27. #include "../../../../Marlin/src/inc/MarlinConfig.h"
  28. //
  29. // Conditionals only used for [features]
  30. //
  31. #if ENABLED(SR_LCD_3W_NL)
  32. // Feature checks for SR_LCD_3W_NL
  33. #elif ANY(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008)
  34. #define USES_LIQUIDTWI2
  35. #elif ENABLED(LCD_I2C_TYPE_PCA8574)
  36. #define USES_LIQUIDCRYSTAL_I2C
  37. #elif ANY(HAS_MARLINUI_HD44780, LCD_I2C_TYPE_PCF8575, SR_LCD_2W_NL, LCM1602)
  38. #define USES_LIQUIDCRYSTAL
  39. #endif
  40. #if SAVED_POSITIONS
  41. #define HAS_SAVED_POSITIONS
  42. #endif
  43. #if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD)
  44. #define HAS_SMART_EFF_MOD
  45. #endif
  46. #if HAS_MARLINUI_MENU
  47. #if ENABLED(BACKLASH_GCODE)
  48. #define HAS_MENU_BACKLASH
  49. #endif
  50. #if ENABLED(LCD_BED_TRAMMING)
  51. #define HAS_MENU_BED_TRAMMING
  52. #endif
  53. #if ENABLED(CANCEL_OBJECTS)
  54. #define HAS_MENU_CANCELOBJECT
  55. #endif
  56. #if ANY(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION)
  57. #define HAS_MENU_DELTA_CALIBRATE
  58. #endif
  59. #if ANY(LED_CONTROL_MENU, CASE_LIGHT_MENU)
  60. #define HAS_MENU_LED
  61. #endif
  62. #if ENABLED(ADVANCED_PAUSE_FEATURE)
  63. #define HAS_MENU_FILAMENT
  64. #endif
  65. #if HAS_MEDIA
  66. #define HAS_MENU_MEDIA
  67. #endif
  68. #if ENABLED(MIXING_EXTRUDER)
  69. #define HAS_MENU_MIXER
  70. #endif
  71. #if ENABLED(POWER_LOSS_RECOVERY)
  72. #define HAS_MENU_JOB_RECOVERY
  73. #endif
  74. #if HAS_POWER_MONITOR
  75. #define HAS_MENU_POWER_MONITOR
  76. #endif
  77. #if HAS_CUTTER
  78. #define HAS_MENU_CUTTER
  79. #endif
  80. #if HAS_TEMPERATURE
  81. #define HAS_MENU_TEMPERATURE
  82. #endif
  83. #if ENABLED(MMU_MENUS)
  84. #define HAS_MENU_MMU
  85. #endif
  86. #if ENABLED(PASSWORD_FEATURE)
  87. #define HAS_MENU_PASSWORD
  88. #endif
  89. #if HAS_TRINAMIC_CONFIG
  90. #define HAS_MENU_TMC
  91. #endif
  92. #if ENABLED(TOUCH_SCREEN_CALIBRATION)
  93. #define HAS_MENU_TOUCH_SCREEN
  94. #endif
  95. #if HAS_LEVELING || HAS_BED_PROBE
  96. #define HAS_MENU_PROBE_LEVEL
  97. #endif
  98. #if ENABLED(ASSISTED_TRAMMING_WIZARD)
  99. #define HAS_MENU_TRAMMING_WIZARD
  100. #endif
  101. #if ENABLED(AUTO_BED_LEVELING_UBL)
  102. #define HAS_MENU_UBL
  103. #endif
  104. #if ENABLED(ONE_CLICK_PRINT)
  105. #define HAS_MENU_ONE_CLICK_PRINT
  106. #endif
  107. #endif
  108. #if HAS_GRAPHICAL_TFT
  109. #include "../../../../Marlin/src/lcd/tft/fontdata/fontdata.h"
  110. #define UI_INCL_(W, H) STRINGIFY_(../../../../Marlin/src/lcd/tft/ui_##W##x##H.h)
  111. #define UI_INCL(W, H) UI_INCL_(W, H)
  112. #include UI_INCL(TFT_WIDTH, TFT_HEIGHT)
  113. #define Latin_Extended_A 1
  114. #define Cyrillic 2
  115. #define Greek 3
  116. #define Katakana 4
  117. #define Korean 5
  118. #define Vietnamese 6
  119. #define Simplified_Chinese 7
  120. #define Traditional_Chinese 8
  121. #if TFT_FONT == NOTOSANS
  122. #if FONT_SIZE == 14
  123. #define TFT_FONT_NOTOSANS_14
  124. #if FONT_EXTRA == Latin_Extended_A
  125. #define TFT_FONT_NOTOSANS_14_LATIN
  126. #elif FONT_EXTRA == Cyrillic
  127. #define TFT_FONT_NOTOSANS_14_CYRIL
  128. #elif FONT_EXTRA == Greek
  129. #define TFT_FONT_NOTOSANS_14_GREEK
  130. #elif FONT_EXTRA == Katakana
  131. #define TFT_FONT_NOTOSANS_14_KATA
  132. #elif FONT_EXTRA == Korean
  133. #define TFT_FONT_NOTOSANS_14_KO
  134. #elif FONT_EXTRA == Vietnamese
  135. #define TFT_FONT_NOTOSANS_14_VI
  136. #elif FONT_EXTRA == Simplified_Chinese
  137. #define TFT_FONT_NOTOSANS_14_ZH_CN
  138. #elif FONT_EXTRA == Traditional_Chinese
  139. #define TFT_FONT_NOTOSANS_14_ZH_TW
  140. #endif
  141. #elif FONT_SIZE == 16
  142. #define TFT_FONT_NOTOSANS_16
  143. #if FONT_EXTRA == Latin_Extended_A
  144. #define TFT_FONT_NOTOSANS_16_LATIN
  145. #elif FONT_EXTRA == Cyrillic
  146. #define TFT_FONT_NOTOSANS_16_CYRIL
  147. #elif FONT_EXTRA == Greek
  148. #define TFT_FONT_NOTOSANS_16_GREEK
  149. #elif FONT_EXTRA == Katakana
  150. #define TFT_FONT_NOTOSANS_16_KATA
  151. #elif FONT_EXTRA == Korean
  152. #define TFT_FONT_NOTOSANS_16_KO
  153. #elif FONT_EXTRA == Vietnamese
  154. #define TFT_FONT_NOTOSANS_16_VI
  155. #elif FONT_EXTRA == Simplified_Chinese
  156. #define TFT_FONT_NOTOSANS_16_ZH_CN
  157. #elif FONT_EXTRA == Traditional_Chinese
  158. #define TFT_FONT_NOTOSANS_16_ZH_TW
  159. #endif
  160. #elif FONT_SIZE == 19
  161. #define TFT_FONT_NOTOSANS_19
  162. #if FONT_EXTRA == Latin_Extended_A
  163. #define TFT_FONT_NOTOSANS_19_LATIN
  164. #elif FONT_EXTRA == Cyrillic
  165. #define TFT_FONT_NOTOSANS_19_CYRIL
  166. #elif FONT_EXTRA == Greek
  167. #define TFT_FONT_NOTOSANS_19_GREEK
  168. #elif FONT_EXTRA == Katakana
  169. #define TFT_FONT_NOTOSANS_19_KATA
  170. #elif FONT_EXTRA == Korean
  171. #define TFT_FONT_NOTOSANS_19_KO
  172. #elif FONT_EXTRA == Vietnamese
  173. #define TFT_FONT_NOTOSANS_19_VI
  174. #elif FONT_EXTRA == Simplified_Chinese
  175. #define TFT_FONT_NOTOSANS_19_ZH_CN
  176. #elif FONT_EXTRA == Traditional_Chinese
  177. #define TFT_FONT_NOTOSANS_19_ZH_TW
  178. #endif
  179. #elif FONT_SIZE == 26
  180. #define TFT_FONT_NOTOSANS_26
  181. #if FONT_EXTRA == Latin_Extended_A
  182. #define TFT_FONT_NOTOSANS_26_LATIN
  183. #elif FONT_EXTRA == Cyrillic
  184. #define TFT_FONT_NOTOSANS_26_CYRIL
  185. #elif FONT_EXTRA == Greek
  186. #define TFT_FONT_NOTOSANS_26_GREEK
  187. #elif FONT_EXTRA == Katakana
  188. #define TFT_FONT_NOTOSANS_26_KATA
  189. #elif FONT_EXTRA == Korean
  190. #define TFT_FONT_NOTOSANS_26_KO
  191. #elif FONT_EXTRA == Vietnamese
  192. #define TFT_FONT_NOTOSANS_26_VI
  193. #elif FONT_EXTRA == Simplified_Chinese
  194. #define TFT_FONT_NOTOSANS_26_ZH_CN
  195. #elif FONT_EXTRA == Traditional_Chinese
  196. #define TFT_FONT_NOTOSANS_26_ZH_TW
  197. #endif
  198. #elif FONT_SIZE == 27
  199. #define TFT_FONT_NOTOSANS_27
  200. #if FONT_EXTRA == Latin_Extended_A
  201. #define TFT_FONT_NOTOSANS_27_LATIN
  202. #elif FONT_EXTRA == Cyrillic
  203. #define TFT_FONT_NOTOSANS_27_CYRIL
  204. #elif FONT_EXTRA == Greek
  205. #define TFT_FONT_NOTOSANS_27_GREEK
  206. #elif FONT_EXTRA == Katakana
  207. #define TFT_FONT_NOTOSANS_27_KATA
  208. #elif FONT_EXTRA == Korean
  209. #define TFT_FONT_NOTOSANS_27_KO
  210. #elif FONT_EXTRA == Vietnamese
  211. #define TFT_FONT_NOTOSANS_27_VI
  212. #elif FONT_EXTRA == Simplified_Chinese
  213. #define TFT_FONT_NOTOSANS_27_ZH_CN
  214. #elif FONT_EXTRA == Traditional_Chinese
  215. #define TFT_FONT_NOTOSANS_27_ZH_TW
  216. #endif
  217. #elif FONT_SIZE == 28
  218. #define TFT_FONT_NOTOSANS_28
  219. #if FONT_EXTRA == Latin_Extended_A
  220. #define TFT_FONT_NOTOSANS_28_LATIN
  221. #elif FONT_EXTRA == Cyrillic
  222. #define TFT_FONT_NOTOSANS_28_CYRIL
  223. #elif FONT_EXTRA == Greek
  224. #define TFT_FONT_NOTOSANS_28_GREEK
  225. #elif FONT_EXTRA == Katakana
  226. #define TFT_FONT_NOTOSANS_28_KATA
  227. #elif FONT_EXTRA == Korean
  228. #define TFT_FONT_NOTOSANS_28_KO
  229. #elif FONT_EXTRA == Vietnamese
  230. #define TFT_FONT_NOTOSANS_28_VI
  231. #elif FONT_EXTRA == Simplified_Chinese
  232. #define TFT_FONT_NOTOSANS_28_ZH_CN
  233. #elif FONT_EXTRA == Traditional_Chinese
  234. #define TFT_FONT_NOTOSANS_28_ZH_TW
  235. #endif
  236. #elif FONT_SIZE == 29
  237. #define TFT_FONT_NOTOSANS_29
  238. #if FONT_EXTRA == Latin_Extended_A
  239. #define TFT_FONT_NOTOSANS_29_LATIN
  240. #elif FONT_EXTRA == Cyrillic
  241. #define TFT_FONT_NOTOSANS_29_CYRIL
  242. #elif FONT_EXTRA == Greek
  243. #define TFT_FONT_NOTOSANS_29_GREEK
  244. #elif FONT_EXTRA == Katakana
  245. #define TFT_FONT_NOTOSANS_29_KATA
  246. #elif FONT_EXTRA == Korean
  247. #define TFT_FONT_NOTOSANS_29_KO
  248. #elif FONT_EXTRA == Vietnamese
  249. #define TFT_FONT_NOTOSANS_29_VI
  250. #elif FONT_EXTRA == Simplified_Chinese
  251. #define TFT_FONT_NOTOSANS_29_ZH_CN
  252. #elif FONT_EXTRA == Traditional_Chinese
  253. #define TFT_FONT_NOTOSANS_29_ZH_TW
  254. #endif
  255. #endif
  256. #elif TFT_FONT == UNIFONT
  257. #if FONT_SIZE == 10
  258. #define TFT_FONT_UNIFONT_10
  259. #if FONT_EXTRA == Latin_Extended_A
  260. #define TFT_FONT_UNIFONT_10_LATIN
  261. #elif FONT_EXTRA == Cyrillic
  262. #define TFT_FONT_UNIFONT_10_CYRIL
  263. #elif FONT_EXTRA == Greek
  264. #define TFT_FONT_UNIFONT_10_GREEK
  265. #elif FONT_EXTRA == Katakana
  266. #define TFT_FONT_UNIFONT_10_KATA
  267. #elif FONT_EXTRA == Korean
  268. #define TFT_FONT_UNIFONT_10_KO
  269. #elif FONT_EXTRA == Vietnamese
  270. #define TFT_FONT_UNIFONT_10_VI
  271. #elif FONT_EXTRA == Simplified_Chinese
  272. #define TFT_FONT_UNIFONT_10_ZH_CN
  273. #elif FONT_EXTRA == Traditional_Chinese
  274. #define TFT_FONT_UNIFONT_10_ZH_TW
  275. #endif
  276. #elif FONT_SIZE == 20
  277. #define TFT_FONT_UNIFONT_20
  278. #if FONT_EXTRA == Latin_Extended_A
  279. #define TFT_FONT_UNIFONT_20_LATIN
  280. #elif FONT_EXTRA == Cyrillic
  281. #define TFT_FONT_UNIFONT_20_CYRIL
  282. #elif FONT_EXTRA == Greek
  283. #define TFT_FONT_UNIFONT_20_GREEK
  284. #elif FONT_EXTRA == Katakana
  285. #define TFT_FONT_UNIFONT_20_KATA
  286. #elif FONT_EXTRA == Korean
  287. #define TFT_FONT_UNIFONT_20_KO
  288. #elif FONT_EXTRA == Vietnamese
  289. #define TFT_FONT_UNIFONT_20_VI
  290. #elif FONT_EXTRA == Simplified_Chinese
  291. #define TFT_FONT_UNIFONT_20_ZH_CN
  292. #elif FONT_EXTRA == Traditional_Chinese
  293. #define TFT_FONT_UNIFONT_20_ZH_TW
  294. #endif
  295. #elif FONT_SIZE == 30
  296. #define TFT_FONT_UNIFONT_30
  297. #if FONT_EXTRA == Latin_Extended_A
  298. #define TFT_FONT_UNIFONT_30_LATIN
  299. #elif FONT_EXTRA == Cyrillic
  300. #define TFT_FONT_UNIFONT_30_CYRIL
  301. #elif FONT_EXTRA == Greek
  302. #define TFT_FONT_UNIFONT_30_GREEK
  303. #elif FONT_EXTRA == Katakana
  304. #define TFT_FONT_UNIFONT_30_KATA
  305. #elif FONT_EXTRA == Korean
  306. #define TFT_FONT_UNIFONT_30_KO
  307. #elif FONT_EXTRA == Vietnamese
  308. #define TFT_FONT_UNIFONT_30_VI
  309. #elif FONT_EXTRA == Simplified_Chinese
  310. #define TFT_FONT_UNIFONT_30_ZH_CN
  311. #elif FONT_EXTRA == Traditional_Chinese
  312. #define TFT_FONT_UNIFONT_30_ZH_TW
  313. #endif
  314. #endif
  315. #elif TFT_FONT == HELVETICA
  316. #if FONT_SIZE == 14
  317. #define TFT_FONT_HELVETICA_14
  318. #elif FONT_SIZE == 19
  319. #define TFT_FONT_HELVETICA_19
  320. #endif
  321. #endif
  322. #endif