mmu2_log.h 692 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #ifndef UNITTEST
  3. #include "Marlin.h"
  4. // Beware - before changing this prefix, think twice
  5. // you'd need to change appmain.cpp app_marlin_serial_output_write_hook
  6. // and MMU2::ReportError + MMU2::ReportProgress
  7. static constexpr char mmu2Magic[] PROGMEM = "MMU2:";
  8. #define SERIAL_MMU2() { serialprintPGM(mmu2Magic); }
  9. #define MMU2_ECHO_MSG(S) do{ SERIAL_ECHO_START; SERIAL_MMU2(); SERIAL_ECHO(S); }while(0)
  10. #define MMU2_ERROR_MSG(S) do{ SERIAL_ERROR_START; SERIAL_MMU2(); SERIAL_ECHO(S); }while(0)
  11. #else // #ifndef UNITTEST
  12. #define MMU2_ECHO_MSG(S) /* */
  13. #define MMU2_ERROR_MSG(S) /* */
  14. #define SERIAL_ECHO(S) /* */
  15. #define SERIAL_ECHOLN(S) /* */
  16. #endif // #ifndef UNITTEST