My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2021 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. #include "../../../inc/MarlinConfig.h"
  24. #ifndef LCD_READ_ID
  25. #define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341)
  26. #endif
  27. #ifndef LCD_READ_ID4
  28. #define LCD_READ_ID4 0xD3 // Read display identification information (0xD3 on ILI9341)
  29. #endif
  30. #define DATASIZE_8BIT 8
  31. #define DATASIZE_16BIT 16
  32. #define TFT_IO_DRIVER TFT_SPI
  33. #define DMA_MINC_ENABLE 1
  34. #define DMA_MINC_DISABLE 0
  35. class TFT_SPI {
  36. private:
  37. static uint32_t ReadID(uint16_t Reg);
  38. static void Transmit(uint16_t Data);
  39. static void TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count);
  40. public:
  41. // static SPIClass SPIx;
  42. static void Init();
  43. static uint32_t GetID();
  44. static bool isBusy();
  45. static void Abort();
  46. static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT);
  47. static void DataTransferEnd();
  48. static void DataTransferAbort();
  49. static void WriteData(uint16_t Data);
  50. static void WriteReg(uint16_t Reg);
  51. static void WriteSequence(uint16_t *Data, uint16_t Count);
  52. // static void WriteMultiple(uint16_t Color, uint16_t Count);
  53. static void WriteMultiple(uint16_t Color, uint32_t Count);
  54. };