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.

debug_out.h 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2019 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. //
  23. // Serial aliases for debugging.
  24. // Include this header after defining DEBUG_OUT
  25. // (or not) in a given .cpp file
  26. //
  27. #undef DEBUG_PRINT_P
  28. #undef DEBUG_ECHO_START
  29. #undef DEBUG_ERROR_START
  30. #undef DEBUG_CHAR
  31. #undef DEBUG_ECHO
  32. #undef DEBUG_ECHO_F
  33. #undef DEBUG_ECHOLN
  34. #undef DEBUG_ECHOPGM
  35. #undef DEBUG_ECHOLNPGM
  36. #undef DEBUG_ECHOPAIR
  37. #undef DEBUG_ECHOPAIR_F
  38. #undef DEBUG_ECHOLNPAIR
  39. #undef DEBUG_ECHOLNPAIR_F
  40. #undef DEBUG_ECHO_MSG
  41. #undef DEBUG_ERROR_MSG
  42. #undef DEBUG_EOL
  43. #undef DEBUG_POS
  44. #undef DEBUG_XYZ
  45. #undef DEBUG_DELAY
  46. #if DEBUG_OUT
  47. #define DEBUG_PRINT_P(P) serialprintPGM(P)
  48. #define DEBUG_ECHO_START SERIAL_ECHO_START
  49. #define DEBUG_ERROR_START SERIAL_ERROR_START
  50. #define DEBUG_CHAR SERIAL_CHAR
  51. #define DEBUG_ECHO SERIAL_ECHO
  52. #define DEBUG_ECHO_F SERIAL_ECHO_F
  53. #define DEBUG_ECHOLN SERIAL_ECHOLN
  54. #define DEBUG_ECHOPGM SERIAL_ECHOPGM
  55. #define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM
  56. #define DEBUG_ECHOPAIR SERIAL_ECHOPAIR
  57. #define DEBUG_ECHOPAIR_F SERIAL_ECHOPAIR_F
  58. #define DEBUG_ECHOLNPAIR SERIAL_ECHOLNPAIR
  59. #define DEBUG_ECHOLNPAIR_F SERIAL_ECHOLNPAIR_F
  60. #define DEBUG_ECHO_MSG SERIAL_ECHO_MSG
  61. #define DEBUG_ERROR_MSG SERIAL_ERROR_MSG
  62. #define DEBUG_EOL SERIAL_EOL
  63. #define DEBUG_POS SERIAL_POS
  64. #define DEBUG_XYZ SERIAL_XYZ
  65. #define DEBUG_DELAY(ms) serial_delay(ms)
  66. #else
  67. #define DEBUG_PRINT_P(P) NOOP
  68. #define DEBUG_ECHO_START() NOOP
  69. #define DEBUG_ERROR_START() NOOP
  70. #define DEBUG_CHAR(...) NOOP
  71. #define DEBUG_ECHO(...) NOOP
  72. #define DEBUG_ECHO_F(...) NOOP
  73. #define DEBUG_ECHOLN(...) NOOP
  74. #define DEBUG_ECHOPGM(...) NOOP
  75. #define DEBUG_ECHOLNPGM(...) NOOP
  76. #define DEBUG_ECHOPAIR(...) NOOP
  77. #define DEBUG_ECHOPAIR_F(...) NOOP
  78. #define DEBUG_ECHOLNPAIR(...) NOOP
  79. #define DEBUG_ECHOLNPAIR_F(...) NOOP
  80. #define DEBUG_ECHO_MSG(...) NOOP
  81. #define DEBUG_ERROR_MSG(...) NOOP
  82. #define DEBUG_EOL() NOOP
  83. #define DEBUG_POS(...) NOOP
  84. #define DEBUG_XYZ(...) NOOP
  85. #define DEBUG_DELAY(...) NOOP
  86. #endif
  87. #undef DEBUG_OUT