|
|
|
@ -44,9 +44,6 @@ enum DebugFlags : unsigned char {
|
|
|
|
|
extern uint8_t marlin_debug_flags;
|
|
|
|
|
#define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F))
|
|
|
|
|
|
|
|
|
|
extern const char echomagic[] PROGMEM;
|
|
|
|
|
extern const char errormagic[] PROGMEM;
|
|
|
|
|
|
|
|
|
|
#if TX_BUFFER_SIZE < 1
|
|
|
|
|
#define SERIAL_FLUSHTX_P(p)
|
|
|
|
|
#define SERIAL_FLUSHTX()
|
|
|
|
@ -84,7 +81,7 @@ extern const char errormagic[] PROGMEM;
|
|
|
|
|
#define SERIAL_PROTOCOLPAIR_P(p, pre, value) (serial_echopair_PGM_P(p,PSTR(pre),(value)))
|
|
|
|
|
#define SERIAL_PROTOCOLLNPAIR_P(p, pre, value) do{ SERIAL_PROTOCOLPAIR_P(p, pre, value); SERIAL_EOL_P(p); }while(0)
|
|
|
|
|
|
|
|
|
|
#define SERIAL_ECHO_START_P(p) (serialprintPGM_P(p,echomagic))
|
|
|
|
|
#define SERIAL_ECHO_START_P(p) serial_echo_start_P(p)
|
|
|
|
|
#define SERIAL_ECHO_P(p,x) SERIAL_PROTOCOL_P(p,x)
|
|
|
|
|
#define SERIAL_ECHOPGM_P(p,x) SERIAL_PROTOCOLPGM_P(p,x)
|
|
|
|
|
#define SERIAL_ECHOLN_P(p,x) SERIAL_PROTOCOLLN_P(p,x)
|
|
|
|
@ -93,7 +90,7 @@ extern const char errormagic[] PROGMEM;
|
|
|
|
|
#define SERIAL_ECHOLNPAIR_P(p,pre, value) SERIAL_PROTOCOLLNPAIR_P(p, pre, value)
|
|
|
|
|
#define SERIAL_ECHO_F_P(p,x,y) SERIAL_PROTOCOL_F_P(p,x,y)
|
|
|
|
|
|
|
|
|
|
#define SERIAL_ERROR_START_P(p) (serialprintPGM_P(p,errormagic))
|
|
|
|
|
#define SERIAL_ERROR_START_P(p) serial_error_start_P(p)
|
|
|
|
|
#define SERIAL_ERROR_P(p,x) SERIAL_PROTOCOL_P(p,x)
|
|
|
|
|
#define SERIAL_ERRORPGM_P(p,x) SERIAL_PROTOCOLPGM_P(p,x)
|
|
|
|
|
#define SERIAL_ERRORLN_P(p,x) SERIAL_PROTOCOLLN_P(p,x)
|
|
|
|
@ -123,7 +120,11 @@ extern const char errormagic[] PROGMEM;
|
|
|
|
|
#define SERIAL_PROTOCOL_SP_P(p,C) serial_spaces_P(p,C)
|
|
|
|
|
|
|
|
|
|
void serialprintPGM_P(const int8_t p, PGM_P str);
|
|
|
|
|
#else
|
|
|
|
|
void serial_echo_start_P(const int8_t p);
|
|
|
|
|
void serial_error_start_P(const int8_t p);
|
|
|
|
|
|
|
|
|
|
#else // NUM_SERIAL < 2
|
|
|
|
|
|
|
|
|
|
#define SERIAL_CHAR_P(p,x) SERIAL_CHAR(x)
|
|
|
|
|
#define SERIAL_PROTOCOL_P(p,x) SERIAL_PROTOCOL(x)
|
|
|
|
|
#define SERIAL_PROTOCOL_F_P(p,x,y) SERIAL_PROTOCOL_F(x,y)
|
|
|
|
@ -184,7 +185,8 @@ extern const char errormagic[] PROGMEM;
|
|
|
|
|
#define SERIAL_PROTOCOL_SP_P(p,C) SERIAL_PROTOCOL_SP(C)
|
|
|
|
|
|
|
|
|
|
#define serialprintPGM_P(p,s) serialprintPGM(s)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif // NUM_SERIAL < 2
|
|
|
|
|
|
|
|
|
|
#define SERIAL_EOL() SERIAL_CHAR('\n')
|
|
|
|
|
|
|
|
|
@ -194,7 +196,7 @@ extern const char errormagic[] PROGMEM;
|
|
|
|
|
#define SERIAL_PROTOCOLPAIR(pre, value) (serial_echopair_PGM(PSTR(pre), value))
|
|
|
|
|
#define SERIAL_PROTOCOLLNPAIR(pre, value) do { SERIAL_PROTOCOLPAIR(pre, value); SERIAL_EOL(); } while(0)
|
|
|
|
|
|
|
|
|
|
#define SERIAL_ECHO_START() (serialprintPGM(echomagic))
|
|
|
|
|
#define SERIAL_ECHO_START() serial_echo_start()
|
|
|
|
|
#define SERIAL_ECHO(x) SERIAL_PROTOCOL(x)
|
|
|
|
|
#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x)
|
|
|
|
|
#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x)
|
|
|
|
@ -203,7 +205,7 @@ extern const char errormagic[] PROGMEM;
|
|
|
|
|
#define SERIAL_ECHOLNPAIR(pre, value) SERIAL_PROTOCOLLNPAIR(pre, value)
|
|
|
|
|
#define SERIAL_ECHO_F(x,y) SERIAL_PROTOCOL_F(x, y)
|
|
|
|
|
|
|
|
|
|
#define SERIAL_ERROR_START() (serialprintPGM(errormagic))
|
|
|
|
|
#define SERIAL_ERROR_START() serial_error_start()
|
|
|
|
|
#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
|
|
|
|
|
#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
|
|
|
|
|
#define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x)
|
|
|
|
@ -236,6 +238,8 @@ void serial_spaces(uint8_t count);
|
|
|
|
|
// Functions for serial printing from PROGMEM. (Saves loads of SRAM.)
|
|
|
|
|
//
|
|
|
|
|
void serialprintPGM(PGM_P str);
|
|
|
|
|
void serial_echo_start();
|
|
|
|
|
void serial_error_start();
|
|
|
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
|
void print_xyz(PGM_P prefix, PGM_P suffix, const float x, const float y, const float z);
|
|
|
|
|