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

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