My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dwin_lcd.h 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. /**
  24. * DWIN UI Enhanced implementation
  25. * Author: Miguel A. Risco-Castillo (MRISCOC)
  26. * Version: 3.8.1
  27. * Date: 2021/11/09
  28. *
  29. * Based on the original code provided by Creality under GPL
  30. */
  31. #include "../common/dwin_api.h"
  32. // Display QR code
  33. // The size of the QR code is (46*QR_Pixel)*(46*QR_Pixel) dot matrix
  34. // QR_Pixel: The pixel size occupied by each point of the QR code: 0x01-0x0F (1-16)
  35. // (Nx, Ny): The coordinates of the upper left corner displayed by the QR code
  36. // str: multi-bit data
  37. void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, char *string);
  38. inline void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, FSTR_P title) {
  39. DWIN_Draw_QR(QR_Pixel, x, y, (char *)title);
  40. }
  41. // Copy area from virtual display area to current screen
  42. // cacheID: virtual area number
  43. // xStart/yStart: Upper-left of virtual area
  44. // xEnd/yEnd: Lower-right of virtual area
  45. // x/y: Screen paste point
  46. void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y);
  47. // Copy area from current virtual display area to current screen
  48. // xStart/yStart: Upper-left of virtual area
  49. // xEnd/yEnd: Lower-right of virtual area
  50. // x/y: Screen paste point
  51. void DWIN_Frame_AreaCopy(uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y);
  52. // Copy area from virtual display area to current screen
  53. // IBD: background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black
  54. // BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration
  55. // BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0)
  56. // cacheID: virtual area number
  57. // xStart/yStart: Upper-left of virtual area
  58. // xEnd/yEnd: Lower-right of virtual area
  59. // x/y: Screen paste point
  60. void DWIN_Frame_AreaCopy(bool IBD, bool BIR, bool BFI, uint8_t cacheID, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y);
  61. // Write buffer data to the SRAM or Flash
  62. // mem: 0x5A=32KB SRAM, 0xA5=16KB Flash
  63. // addr: start address
  64. // length: Bytes to write
  65. // data: address of the buffer with data
  66. void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data);
  67. // Write the contents of the 32KB SRAM data memory into the designated image memory space.
  68. // picID: Picture memory space location, 0x00-0x0F, each space is 32Kbytes
  69. void DWIN_SRAMToPic(uint8_t picID);