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.

DGUSScreenHandler.h 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. #pragma once
  23. /**
  24. * lcd/extui/dgus/DGUSScreenHandler.h
  25. */
  26. #include "../../../inc/MarlinConfigPre.h"
  27. #include "../ui_api.h"
  28. #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
  29. typedef struct {
  30. ExtUI::extruder_t extruder; // which extruder to operate
  31. uint8_t action; // load or unload
  32. bool heated; // heating done ?
  33. float purge_length; // the length to extrude before unload, prevent filament jam
  34. } filament_data_t;
  35. extern filament_data_t filament_data;
  36. #endif
  37. // endianness swap
  38. #define BE16_P(V) ( ((uint8_t*)(V))[0] << 8U | ((uint8_t*)(V))[1] )
  39. #define BE32_P(V) ( ((uint8_t*)(V))[0] << 24U | ((uint8_t*)(V))[1] << 16U | ((uint8_t*)(V))[2] << 8U | ((uint8_t*)(V))[3] )
  40. #if ENABLED(DGUS_LCD_UI_ORIGIN)
  41. #include "origin/DGUSScreenHandler.h"
  42. #elif ENABLED(DGUS_LCD_UI_MKS)
  43. #include "mks/DGUSScreenHandler.h"
  44. #elif ENABLED(DGUS_LCD_UI_FYSETC)
  45. #include "fysetc/DGUSScreenHandler.h"
  46. #elif ENABLED(DGUS_LCD_UI_HIPRECY)
  47. #include "hiprecy/DGUSScreenHandler.h"
  48. #endif
  49. extern DGUSScreenHandlerClass ScreenHandler;
  50. // Helper to define a DGUS_VP_Variable for common use-cases.
  51. #define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR) { \
  52. .VP = VPADR, \
  53. .memadr = VPADRVAR, \
  54. .size = sizeof(VPADRVAR), \
  55. .set_by_display_handler = RXFPTR, \
  56. .send_to_display_handler = TXFPTR \
  57. }
  58. // Helper to define a DGUS_VP_Variable when the size of the var cannot be determined automatically (e.g., a string)
  59. #define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR) { \
  60. .VP = VPADR, \
  61. .memadr = VPADRVAR, \
  62. .size = STRLEN, \
  63. .set_by_display_handler = RXFPTR, \
  64. .send_to_display_handler = TXFPTR \
  65. }