2019-03-14 07:25:42 +00:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2020-02-03 14:00:57 +00:00
|
|
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2019-03-14 07:25:42 +00:00
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
2019-06-28 04:57:50 +00:00
|
|
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
2019-03-14 07:25:42 +00:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2020-07-23 03:20:14 +00:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2019-03-14 07:25:42 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
//
|
|
|
|
// Serial aliases for debugging.
|
|
|
|
// Include this header after defining DEBUG_OUT
|
|
|
|
// (or not) in a given .cpp file
|
|
|
|
//
|
|
|
|
|
2020-07-09 02:44:21 +00:00
|
|
|
#undef DEBUG_SECTION
|
2019-04-23 18:35:02 +00:00
|
|
|
#undef DEBUG_PRINT_P
|
2019-03-14 07:25:42 +00:00
|
|
|
#undef DEBUG_ECHO_START
|
|
|
|
#undef DEBUG_ERROR_START
|
|
|
|
#undef DEBUG_CHAR
|
|
|
|
#undef DEBUG_ECHO
|
2020-06-23 02:12:45 +00:00
|
|
|
#undef DEBUG_DECIMAL
|
2019-03-14 07:25:42 +00:00
|
|
|
#undef DEBUG_ECHO_F
|
|
|
|
#undef DEBUG_ECHOLN
|
|
|
|
#undef DEBUG_ECHOPGM
|
2019-12-01 20:03:07 +00:00
|
|
|
#undef DEBUG_ECHOLNPGM
|
2019-03-14 07:25:42 +00:00
|
|
|
#undef DEBUG_ECHOPAIR
|
2019-12-01 19:31:21 +00:00
|
|
|
#undef DEBUG_ECHOPAIR_P
|
2019-03-14 07:25:42 +00:00
|
|
|
#undef DEBUG_ECHOPAIR_F
|
2019-12-01 19:31:21 +00:00
|
|
|
#undef DEBUG_ECHOPAIR_F_P
|
2019-03-14 07:25:42 +00:00
|
|
|
#undef DEBUG_ECHOLNPAIR
|
2019-12-01 19:31:21 +00:00
|
|
|
#undef DEBUG_ECHOLNPAIR_P
|
2019-03-14 07:25:42 +00:00
|
|
|
#undef DEBUG_ECHOLNPAIR_F
|
2019-12-01 19:31:21 +00:00
|
|
|
#undef DEBUG_ECHOLNPAIR_F_P
|
2019-03-14 07:25:42 +00:00
|
|
|
#undef DEBUG_ECHO_MSG
|
|
|
|
#undef DEBUG_ERROR_MSG
|
|
|
|
#undef DEBUG_EOL
|
2020-05-01 01:09:51 +00:00
|
|
|
#undef DEBUG_FLUSH
|
2019-03-14 07:25:42 +00:00
|
|
|
#undef DEBUG_POS
|
|
|
|
#undef DEBUG_XYZ
|
|
|
|
#undef DEBUG_DELAY
|
2020-07-14 22:58:37 +00:00
|
|
|
#undef DEBUG_SYNCHRONIZE
|
2019-03-14 07:25:42 +00:00
|
|
|
|
|
|
|
#if DEBUG_OUT
|
2020-07-09 02:44:21 +00:00
|
|
|
|
|
|
|
#include "debug_section.h"
|
|
|
|
#define DEBUG_SECTION(N,S,D) SectionLog N(PSTR(S),D)
|
|
|
|
|
2019-04-06 01:02:46 +00:00
|
|
|
#define DEBUG_PRINT_P(P) serialprintPGM(P)
|
2019-03-14 07:25:42 +00:00
|
|
|
#define DEBUG_ECHO_START SERIAL_ECHO_START
|
|
|
|
#define DEBUG_ERROR_START SERIAL_ERROR_START
|
|
|
|
#define DEBUG_CHAR SERIAL_CHAR
|
|
|
|
#define DEBUG_ECHO SERIAL_ECHO
|
2020-06-23 02:12:45 +00:00
|
|
|
#define DEBUG_DECIMAL SERIAL_DECIMAL
|
2019-03-14 07:25:42 +00:00
|
|
|
#define DEBUG_ECHO_F SERIAL_ECHO_F
|
|
|
|
#define DEBUG_ECHOLN SERIAL_ECHOLN
|
|
|
|
#define DEBUG_ECHOPGM SERIAL_ECHOPGM
|
2019-12-01 20:03:07 +00:00
|
|
|
#define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM
|
2019-03-14 07:25:42 +00:00
|
|
|
#define DEBUG_ECHOPAIR SERIAL_ECHOPAIR
|
2019-12-01 19:31:21 +00:00
|
|
|
#define DEBUG_ECHOPAIR_P SERIAL_ECHOPAIR_P
|
2019-03-14 07:25:42 +00:00
|
|
|
#define DEBUG_ECHOPAIR_F SERIAL_ECHOPAIR_F
|
2019-12-01 19:31:21 +00:00
|
|
|
#define DEBUG_ECHOPAIR_F_P SERIAL_ECHOPAIR_F_P
|
2019-03-14 07:25:42 +00:00
|
|
|
#define DEBUG_ECHOLNPAIR SERIAL_ECHOLNPAIR
|
2019-12-01 19:31:21 +00:00
|
|
|
#define DEBUG_ECHOLNPAIR_P SERIAL_ECHOLNPAIR_P
|
2019-03-14 07:25:42 +00:00
|
|
|
#define DEBUG_ECHOLNPAIR_F SERIAL_ECHOLNPAIR_F
|
2019-12-01 19:31:21 +00:00
|
|
|
#define DEBUG_ECHOLNPAIR_F_P SERIAL_ECHOLNPAIR_F_P
|
2019-03-14 07:25:42 +00:00
|
|
|
#define DEBUG_ECHO_MSG SERIAL_ECHO_MSG
|
|
|
|
#define DEBUG_ERROR_MSG SERIAL_ERROR_MSG
|
|
|
|
#define DEBUG_EOL SERIAL_EOL
|
2020-05-01 01:09:51 +00:00
|
|
|
#define DEBUG_FLUSH SERIAL_FLUSH
|
2019-03-14 07:25:42 +00:00
|
|
|
#define DEBUG_POS SERIAL_POS
|
|
|
|
#define DEBUG_XYZ SERIAL_XYZ
|
|
|
|
#define DEBUG_DELAY(ms) serial_delay(ms)
|
2020-07-14 22:58:37 +00:00
|
|
|
#define DEBUG_SYNCHRONIZE() planner.synchronize()
|
2020-07-09 02:44:21 +00:00
|
|
|
|
2019-03-14 07:25:42 +00:00
|
|
|
#else
|
2020-07-09 02:44:21 +00:00
|
|
|
|
|
|
|
#define DEBUG_SECTION(...) NOOP
|
2019-12-01 19:31:21 +00:00
|
|
|
#define DEBUG_PRINT_P(P) NOOP
|
|
|
|
#define DEBUG_ECHO_START() NOOP
|
|
|
|
#define DEBUG_ERROR_START() NOOP
|
|
|
|
#define DEBUG_CHAR(...) NOOP
|
|
|
|
#define DEBUG_ECHO(...) NOOP
|
2020-06-23 02:12:45 +00:00
|
|
|
#define DEBUG_DECIMAL(...) NOOP
|
2019-12-01 19:31:21 +00:00
|
|
|
#define DEBUG_ECHO_F(...) NOOP
|
|
|
|
#define DEBUG_ECHOLN(...) NOOP
|
|
|
|
#define DEBUG_ECHOPGM(...) NOOP
|
|
|
|
#define DEBUG_ECHOLNPGM(...) NOOP
|
|
|
|
#define DEBUG_ECHOPAIR(...) NOOP
|
|
|
|
#define DEBUG_ECHOPAIR_P(...) NOOP
|
|
|
|
#define DEBUG_ECHOPAIR_F(...) NOOP
|
|
|
|
#define DEBUG_ECHOPAIR_F_P(...) NOOP
|
|
|
|
#define DEBUG_ECHOLNPAIR(...) NOOP
|
|
|
|
#define DEBUG_ECHOLNPAIR_P(...) NOOP
|
|
|
|
#define DEBUG_ECHOLNPAIR_F(...) NOOP
|
|
|
|
#define DEBUG_ECHOLNPAIR_F_P(...) NOOP
|
|
|
|
#define DEBUG_ECHO_MSG(...) NOOP
|
|
|
|
#define DEBUG_ERROR_MSG(...) NOOP
|
|
|
|
#define DEBUG_EOL() NOOP
|
2020-05-01 01:09:51 +00:00
|
|
|
#define DEBUG_FLUSH() NOOP
|
2019-12-01 19:31:21 +00:00
|
|
|
#define DEBUG_POS(...) NOOP
|
|
|
|
#define DEBUG_XYZ(...) NOOP
|
|
|
|
#define DEBUG_DELAY(...) NOOP
|
2020-07-14 22:58:37 +00:00
|
|
|
#define DEBUG_SYNCHRONIZE() NOOP
|
2020-07-09 02:44:21 +00:00
|
|
|
|
2019-03-14 07:25:42 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef DEBUG_OUT
|