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.

DGUSRxHandler.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #include "DGUSDisplay.h"
  24. #include "definition/DGUS_VP.h"
  25. namespace DGUSRxHandler {
  26. void ScreenChange(DGUS_VP &, void *);
  27. #if ENABLED(SDSUPPORT)
  28. void Scroll(DGUS_VP &, void *);
  29. void SelectFile(DGUS_VP &, void *);
  30. void PrintFile(DGUS_VP &, void *);
  31. #endif
  32. void PrintAbort(DGUS_VP &, void *);
  33. void PrintPause(DGUS_VP &, void *);
  34. void PrintResume(DGUS_VP &, void *);
  35. void Feedrate(DGUS_VP &, void *);
  36. void Flowrate(DGUS_VP &, void *);
  37. void BabystepSet(DGUS_VP &, void *);
  38. void Babystep(DGUS_VP &, void *);
  39. void TempPreset(DGUS_VP &, void *);
  40. void TempTarget(DGUS_VP &, void *);
  41. void TempCool(DGUS_VP &, void *);
  42. void Steppers(DGUS_VP &, void *);
  43. void ZOffset(DGUS_VP &, void *);
  44. void ZOffsetStep(DGUS_VP &, void *);
  45. void ZOffsetSetStep(DGUS_VP &, void *);
  46. void MoveToPoint(DGUS_VP &, void *);
  47. void Probe(DGUS_VP &, void *);
  48. void DisableABL(DGUS_VP &, void *);
  49. void FilamentSelect(DGUS_VP &, void *);
  50. void FilamentLength(DGUS_VP &, void *);
  51. void FilamentMove(DGUS_VP &, void *);
  52. void Home(DGUS_VP &, void *);
  53. void Move(DGUS_VP &, void *);
  54. void MoveStep(DGUS_VP &, void *);
  55. void MoveSetStep(DGUS_VP &, void *);
  56. void GcodeClear(DGUS_VP &, void *);
  57. void GcodeExecute(DGUS_VP &, void *);
  58. void ResetEEPROM(DGUS_VP &, void *);
  59. void SettingsExtra(DGUS_VP &, void *);
  60. void PIDSelect(DGUS_VP &, void *);
  61. void PIDSetTemp(DGUS_VP &, void *);
  62. void PIDRun(DGUS_VP &, void *);
  63. #if ENABLED(POWER_LOSS_RECOVERY)
  64. void PowerLossAbort(DGUS_VP &, void *);
  65. void PowerLossResume(DGUS_VP &, void *);
  66. #endif
  67. void WaitAbort(DGUS_VP &, void *);
  68. void WaitContinue(DGUS_VP &, void *);
  69. void FanSpeed(DGUS_VP &, void *);
  70. void Volume(DGUS_VP &, void *);
  71. void Brightness(DGUS_VP &, void *);
  72. void Debug(DGUS_VP &, void *);
  73. void StringToExtra(DGUS_VP &, void *);
  74. template<typename T>
  75. void IntegerToExtra(DGUS_VP &vp, void *data_ptr) {
  76. if (!vp.size || !vp.extra) return;
  77. switch (vp.size) {
  78. default: return;
  79. case 1: {
  80. const uint8_t data = *(uint8_t*)data_ptr;
  81. *(T*)vp.extra = (T)data;
  82. break;
  83. }
  84. case 2: {
  85. const uint16_t data = Swap16(*(uint16_t*)data_ptr);
  86. *(T*)vp.extra = (T)data;
  87. break;
  88. }
  89. case 4: {
  90. const uint32_t data = dgus_display.SwapBytes(*(uint32_t*)data_ptr);
  91. *(T*)vp.extra = (T)data;
  92. break;
  93. }
  94. }
  95. }
  96. }