Skip to content

Commit

Permalink
Why do these emit more code?
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jun 4, 2023
1 parent 77652d0 commit ec97ad8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Marlin/src/core/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,26 @@ void SERIAL_ECHO(T arg1, Args ... args) { SERIAL_ECHO(arg1); SERIAL_ECHO(args ..
template <typename T, typename ... Args>
void SERIAL_ECHOLN(T arg1, Args ... args) { SERIAL_ECHO(arg1); SERIAL_ECHO(args ...); SERIAL_EOL(); }

// // Print a single PROGMEM string
// template <typename T>
// void SERIAL_ECHOPGM_P(T pstr) { SERIAL_ECHO_P(pstr); }
// // Print a PROGMEM string, plus an arg, plus more
// template <typename T>
// void SERIAL_ECHOPGM_P(PGM_P pstr, T arg1) { SERIAL_ECHO_P(pstr); SERIAL_ECHO(arg1); }
// // Print a PROGMEM string, plus an arg, plus more
// template <typename T, typename ... Args>
// void SERIAL_ECHOPGM_P(PGM_P pstr, T arg1, Args ... args) { SERIAL_ECHO_P(pstr); SERIAL_ECHO(arg1); SERIAL_ECHOPGM_P(args ...); }

// // Print a single PROGMEM string
// template <typename T>
// void SERIAL_ECHOLNPGM_P(T pstr) { SERIAL_ECHOLN_P(pstr); }
// // Print a PROGMEM string, plus an arg, plus more
// template <typename T>
// void SERIAL_ECHOLNPGM_P(PGM_P pstr, T arg1) { SERIAL_ECHO_P(pstr); SERIAL_ECHO(arg1); SERIAL_EOL(); }
// // Print a PROGMEM string, plus an arg, plus more
// template <typename T, typename ... Args>
// void SERIAL_ECHOLNPGM_P(PGM_P pstr, T arg1, Args ... args) { SERIAL_ECHO_P(pstr); SERIAL_ECHO(arg1); SERIAL_ECHOLNPGM_P(args ...); }

//
// SERIAL_ECHOPGM... macros are used to output string-value pairs, wrapping
// all the odd loose string elements as PROGMEM strings.
Expand Down

0 comments on commit ec97ad8

Please sign in to comment.