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.

boards.h 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /************
  2. * boards.h *
  3. ************/
  4. /****************************************************************************
  5. * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
  6. * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
  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. * To view a copy of the GNU General Public License, go to the following *
  19. * location: <http://www.gnu.org/licenses/>. *
  20. ****************************************************************************/
  21. #pragma once
  22. #define HAS_RESOLUTION (defined(TOUCH_UI_320x240) || defined(TOUCH_UI_480x272) || defined(TOUCH_UI_800x480))
  23. #define IS_FT800 \
  24. constexpr uint16_t ftdi_chip = 800; \
  25. using namespace FTDI_FT800; \
  26. namespace DL { \
  27. using namespace FTDI_FT800_DL; \
  28. } \
  29. typedef ft800_memory_map ftdi_memory_map; \
  30. typedef ft800_registers ftdi_registers;
  31. #define IS_FT810 \
  32. constexpr uint16_t ftdi_chip = 810; \
  33. using namespace FTDI_FT810; \
  34. namespace DL { \
  35. using namespace FTDI_FT800_DL; \
  36. using namespace FTDI_FT810_DL; \
  37. } \
  38. typedef ft810_memory_map ftdi_memory_map; \
  39. typedef ft810_registers ftdi_registers;
  40. #ifdef LCD_FTDI_VM800B35A
  41. #if !HAS_RESOLUTION
  42. #define TOUCH_UI_320x240
  43. #endif
  44. #ifndef FTDI_API_LEVEL
  45. #define FTDI_API_LEVEL 800
  46. #endif
  47. namespace FTDI {
  48. IS_FT800
  49. constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
  50. constexpr bool GPIO_0_Audio_Enable = false; /* 1 = does use GPIO00 for amplifier control, 0 = not in use for Audio */
  51. constexpr bool GPIO_1_Audio_Shutdown = true; /* 1 = does use GPIO01 for amplifier control, 0 = not in use for Audio */
  52. constexpr uint8_t Swizzle = 2;
  53. constexpr uint8_t CSpread = 1;
  54. constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */
  55. }
  56. /*
  57. * Settings for the Haoyu Electronics, 4.3" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY43B)
  58. * Haoyu Electronics, 5" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY50B)
  59. *
  60. * http://www.hotmcu.com/43-graphical-lcd-touchscreen-480x272-spi-ft800-p-111.html?cPath=6_16
  61. * http://www.hotmcu.com/5-graphical-lcd-touchscreen-480x272-spi-ft800-p-124.html?cPath=6_16
  62. *
  63. * Datasheet:
  64. *
  65. * http://www.hantronix.com/files/data/1278363262430-3.pdf
  66. * http://www.haoyuelectronics.com/Attachment/HY43-LCD/LCD%20DataSheet.pdf
  67. * http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf
  68. *
  69. */
  70. #elif defined(LCD_HAOYU_FT800CB)
  71. #if !HAS_RESOLUTION
  72. #define TOUCH_UI_480x272
  73. #endif
  74. #ifndef FTDI_API_LEVEL
  75. #define FTDI_API_LEVEL 800
  76. #endif
  77. namespace FTDI {
  78. IS_FT800
  79. constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
  80. constexpr bool GPIO_0_Audio_Enable = false;
  81. constexpr bool GPIO_1_Audio_Shutdown = false;
  82. constexpr uint8_t Swizzle = 0;
  83. constexpr uint8_t CSpread = 1;
  84. constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
  85. }
  86. /*
  87. * Settings for the Haoyu Electronics, 5" Graphical LCD Touchscreen, 800x480, SPI, FT810
  88. *
  89. * http://www.hotmcu.com/5-graphical-lcd-touchscreen-800x480-spi-ft810-p-286.html
  90. *
  91. * Datasheet:
  92. *
  93. * http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf
  94. *
  95. */
  96. #elif defined(LCD_HAOYU_FT810CB)
  97. #if !HAS_RESOLUTION
  98. #define TOUCH_UI_800x480
  99. #endif
  100. #ifndef FTDI_API_LEVEL
  101. #define FTDI_API_LEVEL 810
  102. #endif
  103. namespace FTDI {
  104. IS_FT810
  105. constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
  106. constexpr bool GPIO_0_Audio_Enable = false;
  107. constexpr bool GPIO_1_Audio_Shutdown = false;
  108. constexpr uint8_t Swizzle = 0;
  109. constexpr uint8_t CSpread = 1;
  110. constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
  111. }
  112. /*
  113. * Settings for the 4D Systems, 4.3" Embedded SPI Display 480x272, SPI, FT800 (4DLCD-FT843)
  114. *
  115. * https://4dsystems.com.au/4dlcd-ft843
  116. *
  117. * Datasheet:
  118. *
  119. * https://4dsystems.com.au/mwdownloads/download/link/id/52/
  120. *
  121. */
  122. #elif defined(LCD_4DSYSTEMS_4DLCD_FT843)
  123. #if !HAS_RESOLUTION
  124. #define TOUCH_UI_480x272
  125. #endif
  126. #ifndef FTDI_API_LEVEL
  127. #define FTDI_API_LEVEL 800
  128. #endif
  129. namespace FTDI {
  130. IS_FT800
  131. constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
  132. constexpr bool GPIO_0_Audio_Enable = false;
  133. constexpr bool GPIO_1_Audio_Shutdown = true;
  134. constexpr uint8_t Swizzle = 0;
  135. constexpr uint8_t CSpread = 1;
  136. constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */
  137. }
  138. /*
  139. * Settings for the Aleph Objects Color LCD User Interface
  140. *
  141. * https://code.alephobjects.com/source/aotctl/
  142. *
  143. * Datasheet:
  144. *
  145. * https://www.hantronix.com/files/data/s1501799605s500-gh7.pdf
  146. *
  147. */
  148. #elif defined(LCD_ALEPHOBJECTS_CLCD_UI)
  149. #if !HAS_RESOLUTION
  150. #define TOUCH_UI_800x480
  151. #endif
  152. #ifndef FTDI_API_LEVEL
  153. #define FTDI_API_LEVEL 810
  154. #endif
  155. namespace FTDI {
  156. IS_FT810
  157. constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated
  158. constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio
  159. constexpr bool GPIO_1_Audio_Shutdown = false;
  160. constexpr uint8_t Swizzle = 0;
  161. constexpr uint8_t CSpread = 0;
  162. constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
  163. }
  164. #else
  165. #error "Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify 'ftdi_eve_boards.h'."
  166. #endif