Browse Source

Serial macros cleanup

Scott Lahteine 4 years ago
parent
commit
dd42831cba
48 changed files with 101 additions and 117 deletions
  1. 3
    4
      Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp
  2. 4
    7
      Marlin/src/HAL/shared/Delay.cpp
  3. 2
    3
      Marlin/src/MarlinCore.cpp
  4. 2
    2
      Marlin/src/core/debug_out.h
  5. 2
    2
      Marlin/src/core/debug_section.h
  6. 3
    3
      Marlin/src/core/utility.cpp
  7. 2
    2
      Marlin/src/feature/bedlevel/ubl/ubl.cpp
  8. 3
    3
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  9. 4
    5
      Marlin/src/feature/host_actions.cpp
  10. 1
    1
      Marlin/src/feature/max7219.cpp
  11. 1
    1
      Marlin/src/feature/meatpack.cpp
  12. 1
    1
      Marlin/src/feature/pause.cpp
  13. 1
    1
      Marlin/src/feature/powerloss.cpp
  14. 1
    1
      Marlin/src/feature/probe_temp_comp.cpp
  15. 3
    5
      Marlin/src/feature/runout.h
  16. 3
    3
      Marlin/src/feature/tmc_util.cpp
  17. 2
    2
      Marlin/src/feature/twibus.cpp
  18. 1
    1
      Marlin/src/gcode/bedlevel/G35.cpp
  19. 1
    1
      Marlin/src/gcode/bedlevel/abl/G29.cpp
  20. 1
    1
      Marlin/src/gcode/calibrate/G28.cpp
  21. 3
    3
      Marlin/src/gcode/calibrate/G33.cpp
  22. 1
    1
      Marlin/src/gcode/calibrate/M852.cpp
  23. 1
    1
      Marlin/src/gcode/config/M217.cpp
  24. 1
    1
      Marlin/src/gcode/config/M302.cpp
  25. 1
    1
      Marlin/src/gcode/config/M43.cpp
  26. 1
    1
      Marlin/src/gcode/control/M111.cpp
  27. 1
    1
      Marlin/src/gcode/control/M80_M81.cpp
  28. 6
    6
      Marlin/src/gcode/feature/L6470/M122.cpp
  29. 1
    1
      Marlin/src/gcode/feature/L6470/M906.cpp
  30. 1
    1
      Marlin/src/gcode/feature/powerloss/M1000.cpp
  31. 2
    2
      Marlin/src/gcode/feature/powerloss/M413.cpp
  32. 1
    2
      Marlin/src/gcode/feature/trinamic/M569.cpp
  33. 1
    1
      Marlin/src/gcode/geometry/G17-G19.cpp
  34. 2
    2
      Marlin/src/gcode/host/M115.cpp
  35. 2
    3
      Marlin/src/gcode/host/M360.cpp
  36. 1
    2
      Marlin/src/gcode/queue.cpp
  37. 1
    1
      Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp
  38. 4
    4
      Marlin/src/libs/L64XX/L64XX_Marlin.cpp
  39. 1
    1
      Marlin/src/libs/stopwatch.cpp
  40. 2
    5
      Marlin/src/libs/vector_3.cpp
  41. 2
    3
      Marlin/src/module/endstops.cpp
  42. 1
    1
      Marlin/src/module/planner.cpp
  43. 3
    3
      Marlin/src/module/printcounter.cpp
  44. 2
    3
      Marlin/src/module/probe.cpp
  45. 6
    6
      Marlin/src/module/settings.cpp
  46. 5
    5
      Marlin/src/module/temperature.cpp
  47. 5
    5
      Marlin/src/pins/pinsDebug.h
  48. 2
    2
      Marlin/src/sd/cardreader.cpp

+ 3
- 4
Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp View File

@@ -83,14 +83,13 @@ bool PersistentStore::access_finish() {
83 83
 static void debug_rw(const bool write, int &pos, const uint8_t *value, const size_t size, const FRESULT s, const size_t total=0) {
84 84
   PGM_P const rw_str = write ? PSTR("write") : PSTR("read");
85 85
   SERIAL_CHAR(' ');
86
-  serialprintPGM(rw_str);
86
+  SERIAL_ECHOPGM_P(rw_str);
87 87
   SERIAL_ECHOLNPAIR("_data(", pos, ",", value, ",", size, ", ...)");
88 88
   if (total) {
89 89
     SERIAL_ECHOPGM(" f_");
90
-    serialprintPGM(rw_str);
90
+    SERIAL_ECHOPGM_P(rw_str);
91 91
     SERIAL_ECHOPAIR("()=", s, "\n size=", size, "\n bytes_");
92
-    serialprintPGM(write ? PSTR("written=") : PSTR("read="));
93
-    SERIAL_ECHOLN(total);
92
+    SERIAL_ECHOLNPAIR_P(write ? PSTR("written=") : PSTR("read="), total);
94 93
   }
95 94
   else
96 95
     SERIAL_ECHOLNPAIR(" f_lseek()=", s);

+ 4
- 7
Marlin/src/HAL/shared/Delay.cpp View File

@@ -109,11 +109,11 @@
109 109
     void dump_delay_accuracy_check() {
110 110
       auto report_call_time = [](PGM_P const name, PGM_P const unit, const uint32_t cycles, const uint32_t total, const bool do_flush=true) {
111 111
         SERIAL_ECHOPGM("Calling ");
112
-        serialprintPGM(name);
112
+        SERIAL_ECHOPGM_P(name);
113 113
         SERIAL_ECHOLNPAIR(" for ", cycles);
114
-        serialprintPGM(unit);
114
+        SERIAL_ECHOPGM_P(unit);
115 115
         SERIAL_ECHOLNPAIR(" took: ", total);
116
-        serialprintPGM(unit);
116
+        SERIAL_ECHOPGM_P(unit);
117 117
         if (do_flush) SERIAL_FLUSHTX();
118 118
       };
119 119
 
@@ -169,10 +169,7 @@
169 169
 
170 170
   void calibrate_delay_loop() {}
171 171
   #if ENABLED(MARLIN_DEV_MODE)
172
-    void dump_delay_accuracy_check() {
173
-      static PGMSTR(none, "N/A on this platform");
174
-      serialprintPGM(none);
175
-    }
172
+    void dump_delay_accuracy_check() { SERIAL_ECHOPGM_P(PSTR("N/A on this platform")); }
176 173
   #endif
177 174
 
178 175
 #endif

+ 2
- 3
Marlin/src/MarlinCore.cpp View File

@@ -885,8 +885,7 @@ void setup() {
885 885
     auto log_current_ms = [&](PGM_P const msg) {
886 886
       SERIAL_ECHO_START();
887 887
       SERIAL_CHAR('['); SERIAL_ECHO(millis()); SERIAL_ECHOPGM("] ");
888
-      serialprintPGM(msg);
889
-      SERIAL_EOL();
888
+      SERIAL_ECHOLNPGM_P(msg);
890 889
     };
891 890
     #define SETUP_LOG(M) log_current_ms(PSTR(M))
892 891
   #else
@@ -1003,7 +1002,7 @@ void setup() {
1003 1002
   if (mcu & RST_SOFTWARE) SERIAL_ECHOLNPGM(STR_SOFTWARE_RESET);
1004 1003
   HAL_clear_reset_source();
1005 1004
 
1006
-  serialprintPGM(GET_TEXT(MSG_MARLIN));
1005
+  SERIAL_ECHOPGM_P(GET_TEXT(MSG_MARLIN));
1007 1006
   SERIAL_CHAR(' ');
1008 1007
   SERIAL_ECHOLNPGM(SHORT_BUILD_VERSION);
1009 1008
   SERIAL_EOL();

+ 2
- 2
Marlin/src/core/debug_out.h View File

@@ -59,7 +59,7 @@
59 59
   #include "debug_section.h"
60 60
   #define DEBUG_SECTION(N,S,D)    SectionLog N(PSTR(S),D)
61 61
 
62
-  #define DEBUG_PRINT_P(P)        serialprintPGM(P)
62
+  #define DEBUG_ECHOPGM_P(P)      SERIAL_ECHOPGM_P(P)
63 63
   #define DEBUG_ECHO_START        SERIAL_ECHO_START
64 64
   #define DEBUG_ERROR_START       SERIAL_ERROR_START
65 65
   #define DEBUG_CHAR              SERIAL_CHAR
@@ -89,7 +89,7 @@
89 89
 #else
90 90
 
91 91
   #define DEBUG_SECTION(...)        NOOP
92
-  #define DEBUG_PRINT_P(P)          NOOP
92
+  #define DEBUG_ECHOPGM_P(P)          NOOP
93 93
   #define DEBUG_ECHO_START()        NOOP
94 94
   #define DEBUG_ERROR_START()       NOOP
95 95
   #define DEBUG_CHAR(...)           NOOP

+ 2
- 2
Marlin/src/core/debug_section.h View File

@@ -38,10 +38,10 @@ private:
38 38
   bool debug;
39 39
 
40 40
   void echo_msg(PGM_P const pre) {
41
-    serialprintPGM(pre);
41
+    SERIAL_ECHOPGM_P(pre);
42 42
     if (the_msg) {
43 43
       SERIAL_CHAR(' ');
44
-      serialprintPGM(the_msg);
44
+      SERIAL_ECHOPGM_P(the_msg);
45 45
     }
46 46
     SERIAL_CHAR(' ');
47 47
     print_xyz(current_position);

+ 3
- 3
Marlin/src/core/utility.cpp View File

@@ -92,9 +92,9 @@ void safe_delay(millis_t ms) {
92 92
           SERIAL_ECHOPGM(" (Aligned With");
93 93
 
94 94
         if (probe.offset_xy.y > 0)
95
-          serialprintPGM(ENABLED(IS_SCARA) ? PSTR("-Distal") : PSTR("-Back"));
95
+          SERIAL_ECHOPGM_P(ENABLED(IS_SCARA) ? PSTR("-Distal") : PSTR("-Back"));
96 96
         else if (probe.offset_xy.y < 0)
97
-          serialprintPGM(ENABLED(IS_SCARA) ? PSTR("-Proximal") : PSTR("-Front"));
97
+          SERIAL_ECHOPGM_P(ENABLED(IS_SCARA) ? PSTR("-Proximal") : PSTR("-Front"));
98 98
         else if (probe.offset_xy.x != 0)
99 99
           SERIAL_ECHOPGM("-Center");
100 100
 
@@ -102,7 +102,7 @@ void safe_delay(millis_t ms) {
102 102
 
103 103
       #endif
104 104
 
105
-      serialprintPGM(probe.offset.z < 0 ? PSTR("Below") : probe.offset.z > 0 ? PSTR("Above") : PSTR("Same Z as"));
105
+      SERIAL_ECHOPGM_P(probe.offset.z < 0 ? PSTR("Below") : probe.offset.z > 0 ? PSTR("Above") : PSTR("Same Z as"));
106 106
       SERIAL_ECHOLNPGM(" Nozzle)");
107 107
 
108 108
     #endif

+ 2
- 2
Marlin/src/feature/bedlevel/ubl/ubl.cpp View File

@@ -181,7 +181,7 @@ void unified_bed_leveling::display_map(const int map_type) {
181 181
   }
182 182
   else {
183 183
     SERIAL_ECHOPGM(" for ");
184
-    serialprintPGM(csv ? PSTR("CSV:\n") : PSTR("LCD:\n"));
184
+    SERIAL_ECHOPGM_P(csv ? PSTR("CSV:\n") : PSTR("LCD:\n"));
185 185
   }
186 186
 
187 187
   // Add XY probe offset from extruder because probe.probe_at_point() subtracts them when
@@ -212,7 +212,7 @@ void unified_bed_leveling::display_map(const int map_type) {
212 212
         // TODO: Display on Graphical LCD
213 213
       }
214 214
       else if (isnan(f))
215
-        serialprintPGM(human ? PSTR("  .   ") : PSTR("NAN"));
215
+        SERIAL_ECHOPGM_P(human ? PSTR("  .   ") : PSTR("NAN"));
216 216
       else if (human || csv) {
217 217
         if (human && f >= 0.0) SERIAL_CHAR(f > 0 ? '+' : ' ');  // Display sign also for positive numbers (' ' for 0)
218 218
         SERIAL_ECHO_F(f, 3);                                    // Positive: 5 digits, Negative: 6 digits

+ 3
- 3
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -908,11 +908,11 @@ void unified_bed_leveling::shift_mesh_height() {
908 908
       if (do_ubl_mesh_map) display_map(g29_map_type);  // show user where we're probing
909 909
 
910 910
       if (parser.seen('B')) {
911
-        serialprintPGM(GET_TEXT(MSG_UBL_BC_INSERT));
911
+        SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT));
912 912
         LCD_MESSAGEPGM(MSG_UBL_BC_INSERT);
913 913
       }
914 914
       else {
915
-        serialprintPGM(GET_TEXT(MSG_UBL_BC_INSERT2));
915
+        SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT2));
916 916
         LCD_MESSAGEPGM(MSG_UBL_BC_INSERT2);
917 917
       }
918 918
 
@@ -1576,7 +1576,7 @@ void unified_bed_leveling::smart_fill_mesh() {
1576 1576
           return normal.x * pos.x + normal.y * pos.y + zadd;
1577 1577
         };
1578 1578
         auto debug_pt = [](PGM_P const pre, const xy_pos_t &pos, const float &zadd) {
1579
-          d_from(); serialprintPGM(pre);
1579
+          d_from(); SERIAL_ECHOPGM_P(pre);
1580 1580
           DEBUG_ECHO_F(normed(pos, zadd), 6);
1581 1581
           DEBUG_ECHOLNPAIR_F("   Z error = ", zadd - get_z_correction(pos), 6);
1582 1582
         };

+ 4
- 5
Marlin/src/feature/host_actions.cpp View File

@@ -40,7 +40,7 @@
40 40
 void host_action(PGM_P const pstr, const bool eol) {
41 41
   PORT_REDIRECT(SERIAL_ALL);
42 42
   SERIAL_ECHOPGM("//action:");
43
-  serialprintPGM(pstr);
43
+  SERIAL_ECHOPGM_P(pstr);
44 44
   if (eol) SERIAL_EOL();
45 45
 }
46 46
 
@@ -86,14 +86,13 @@ void host_action(PGM_P const pstr, const bool eol) {
86 86
   void host_action_notify_P(PGM_P const message) {
87 87
     PORT_REDIRECT(SERIAL_ALL);
88 88
     host_action(PSTR("notification "), false);
89
-    serialprintPGM(message);
90
-    SERIAL_EOL();
89
+    SERIAL_ECHOLNPGM_P(message);
91 90
   }
92 91
 
93 92
   void host_action_prompt(PGM_P const ptype, const bool eol=true) {
94 93
     PORT_REDIRECT(SERIAL_ALL);
95 94
     host_action(PSTR("prompt_"), false);
96
-    serialprintPGM(ptype);
95
+    SERIAL_ECHOPGM_P(ptype);
97 96
     if (eol) SERIAL_EOL();
98 97
   }
99 98
 
@@ -101,7 +100,7 @@ void host_action(PGM_P const pstr, const bool eol) {
101 100
     host_action_prompt(ptype, false);
102 101
     PORT_REDIRECT(SERIAL_ALL);
103 102
     SERIAL_CHAR(' ');
104
-    serialprintPGM(pstr);
103
+    SERIAL_ECHOPGM_P(pstr);
105 104
     if (extra_char != '\0') SERIAL_CHAR(extra_char);
106 105
     SERIAL_EOL();
107 106
   }

+ 1
- 1
Marlin/src/feature/max7219.cpp View File

@@ -127,7 +127,7 @@ uint8_t Max7219::suspended; // = 0;
127 127
 void Max7219::error(const char * const func, const int32_t v1, const int32_t v2/*=-1*/) {
128 128
   #if ENABLED(MAX7219_ERRORS)
129 129
     SERIAL_ECHOPGM("??? Max7219::");
130
-    serialprintPGM(func);
130
+    SERIAL_ECHOPGM_P(func);
131 131
     SERIAL_CHAR('(');
132 132
     SERIAL_ECHO(v1);
133 133
     if (v2 > 0) SERIAL_ECHOPAIR(", ", v2);

+ 1
- 1
Marlin/src/feature/meatpack.cpp View File

@@ -179,7 +179,7 @@ void MeatPack::report_state() {
179 179
   SERIAL_ECHOPGM("[MP] ");
180 180
   SERIAL_ECHOPGM(MeatPack_ProtocolVersion " ");
181 181
   serialprint_onoff(TEST(state, MPConfig_Bit_Active));
182
-  serialprintPGM(TEST(state, MPConfig_Bit_NoSpaces) ? PSTR(" NSP\n") : PSTR(" ESP\n"));
182
+  SERIAL_ECHOPGM_P(TEST(state, MPConfig_Bit_NoSpaces) ? PSTR(" NSP\n") : PSTR(" ESP\n"));
183 183
 }
184 184
 
185 185
 /**

+ 1
- 1
Marlin/src/feature/pause.cpp View File

@@ -460,7 +460,7 @@ void show_continue_prompt(const bool is_reload) {
460 460
 
461 461
   ui.pause_show_message(is_reload ? PAUSE_MESSAGE_INSERT : PAUSE_MESSAGE_WAITING);
462 462
   SERIAL_ECHO_START();
463
-  serialprintPGM(is_reload ? PSTR(_PMSG(STR_FILAMENT_CHANGE_INSERT) "\n") : PSTR(_PMSG(STR_FILAMENT_CHANGE_WAIT) "\n"));
463
+  SERIAL_ECHOPGM_P(is_reload ? PSTR(_PMSG(STR_FILAMENT_CHANGE_INSERT) "\n") : PSTR(_PMSG(STR_FILAMENT_CHANGE_WAIT) "\n"));
464 464
 }
465 465
 
466 466
 void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) {

+ 1
- 1
Marlin/src/feature/powerloss.cpp View File

@@ -531,7 +531,7 @@ void PrintJobRecovery::resume() {
531 531
 #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
532 532
 
533 533
   void PrintJobRecovery::debug(PGM_P const prefix) {
534
-    DEBUG_PRINT_P(prefix);
534
+    DEBUG_ECHOPGM_P(prefix);
535 535
     DEBUG_ECHOLNPAIR(" Job Recovery Info...\nvalid_head:", info.valid_head, " valid_foot:", info.valid_foot);
536 536
     if (info.valid_head) {
537 537
       if (info.valid_head == info.valid_foot) {

+ 1
- 1
Marlin/src/feature/probe_temp_comp.cpp View File

@@ -73,7 +73,7 @@ void ProbeTempComp::print_offsets() {
73 73
   LOOP_L_N(s, TSI_COUNT) {
74 74
     float temp = cali_info[s].start_temp;
75 75
     for (int16_t i = -1; i < cali_info[s].measurements; ++i) {
76
-      serialprintPGM(s == TSI_BED ? PSTR("Bed") :
76
+      SERIAL_ECHOPGM_P(s == TSI_BED ? PSTR("Bed") :
77 77
         #if ENABLED(USE_TEMP_EXT_COMPENSATION)
78 78
           s == TSI_EXT ? PSTR("Extruder") :
79 79
         #endif

+ 3
- 5
Marlin/src/feature/runout.h View File

@@ -287,7 +287,7 @@ class FilamentSensorBase {
287 287
           if (out != was_out) {
288 288
             was_out = out;
289 289
             SERIAL_ECHOPGM("Filament ");
290
-            serialprintPGM(out ? PSTR("OUT\n") : PSTR("IN\n"));
290
+            SERIAL_ECHOPGM_P(out ? PSTR("OUT\n") : PSTR("IN\n"));
291 291
           }
292 292
         #endif
293 293
       }
@@ -320,10 +320,8 @@ class FilamentSensorBase {
320 320
           const millis_t ms = millis();
321 321
           if (ELAPSED(ms, t)) {
322 322
             t = millis() + 1000UL;
323
-            LOOP_L_N(i, EXTRUDERS) {
324
-              serialprintPGM(i ? PSTR(", ") : PSTR("Remaining mm: "));
325
-              SERIAL_ECHO(runout_mm_countdown[i]);
326
-            }
323
+            LOOP_L_N(i, EXTRUDERS)
324
+              SERIAL_ECHOPAIR_P(i ? PSTR(", ") : PSTR("Remaining mm: "), runout_mm_countdown[i]);
327 325
             SERIAL_EOL();
328 326
           }
329 327
         #endif

+ 3
- 3
Marlin/src/feature/tmc_util.cpp View File

@@ -546,7 +546,7 @@
546 546
   };
547 547
 
548 548
   template<class TMC>
549
-  static void print_vsense(TMC &st) { serialprintPGM(st.vsense() ? PSTR("1=.18") : PSTR("0=.325")); }
549
+  static void print_vsense(TMC &st) { SERIAL_ECHOPGM_P(st.vsense() ? PSTR("1=.18") : PSTR("0=.325")); }
550 550
 
551 551
   #if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC5130)
552 552
     static void _tmc_status(TMC2130Stepper &st, const TMC_debug_enum i) {
@@ -717,7 +717,7 @@
717 717
           SERIAL_ECHO(st.cs());
718 718
           SERIAL_ECHOPGM("/31");
719 719
           break;
720
-        case TMC_VSENSE: serialprintPGM(st.vsense() ? PSTR("1=.165") : PSTR("0=.310")); break;
720
+        case TMC_VSENSE: SERIAL_ECHOPGM_P(st.vsense() ? PSTR("1=.165") : PSTR("0=.310")); break;
721 721
         case TMC_MICROSTEPS: SERIAL_ECHO(st.microsteps()); break;
722 722
         //case TMC_OTPW: serialprint_truefalse(st.otpw()); break;
723 723
         //case TMC_OTPW_TRIGGERED: serialprint_truefalse(st.getOTPW()); break;
@@ -1208,7 +1208,7 @@ static bool test_connection(TMC &st) {
1208 1208
     case 1: stat = PSTR("HIGH"); break;
1209 1209
     case 2: stat = PSTR("LOW"); break;
1210 1210
   }
1211
-  serialprintPGM(stat);
1211
+  SERIAL_ECHOPGM_P(stat);
1212 1212
   SERIAL_EOL();
1213 1213
 
1214 1214
   return test_result;

+ 2
- 2
Marlin/src/feature/twibus.cpp View File

@@ -83,7 +83,7 @@ void TWIBus::send() {
83 83
 // static
84 84
 void TWIBus::echoprefix(uint8_t bytes, const char pref[], uint8_t adr) {
85 85
   SERIAL_ECHO_START();
86
-  serialprintPGM(pref);
86
+  SERIAL_ECHOPGM_P(pref);
87 87
   SERIAL_ECHOPAIR(": from:", adr, " bytes:", bytes, " data:");
88 88
 }
89 89
 
@@ -172,7 +172,7 @@ void TWIBus::flush() {
172 172
   // static
173 173
   void TWIBus::prefix(const char func[]) {
174 174
     SERIAL_ECHOPGM("TWIBus::");
175
-    serialprintPGM(func);
175
+    SERIAL_ECHOPGM_P(func);
176 176
     SERIAL_ECHOPGM(": ");
177 177
   }
178 178
   void TWIBus::debug(const char func[], uint32_t adr) {

+ 1
- 1
Marlin/src/gcode/bedlevel/G35.cpp View File

@@ -114,7 +114,7 @@ void GcodeSuite::G35() {
114 114
 
115 115
     if (DEBUGGING(LEVELING)) {
116 116
       DEBUG_ECHOPAIR("Probing point ", i, " (");
117
-      DEBUG_PRINT_P((char *)pgm_read_ptr(&tramming_point_name[i]));
117
+      DEBUG_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
118 118
       DEBUG_CHAR(')');
119 119
       DEBUG_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y, SP_Z_STR, z_probed_height);
120 120
     }

+ 1
- 1
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -786,7 +786,7 @@ G29_TYPE GcodeSuite::G29() {
786 786
         float min_diff = 999;
787 787
 
788 788
         auto print_topo_map = [&](PGM_P const title, const bool get_min) {
789
-          serialprintPGM(title);
789
+          SERIAL_ECHOPGM_P(title);
790 790
           for (int8_t yy = abl_grid_points.y - 1; yy >= 0; yy--) {
791 791
             LOOP_L_N(xx, abl_grid_points.x) {
792 792
               const int ind = indexIntoAB[xx][yy];

+ 1
- 1
Marlin/src/gcode/calibrate/G28.cpp View File

@@ -259,7 +259,7 @@ void GcodeSuite::G28() {
259 259
 
260 260
   #if HAS_HOMING_CURRENT
261 261
     auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b){
262
-      serialprintPGM(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b);
262
+      DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b);
263 263
     };
264 264
     #if HAS_CURRENT_HOME(X)
265 265
       const int16_t tmc_save_current_X = stepperX.getMilliamps();

+ 3
- 3
Marlin/src/gcode/calibrate/G33.cpp View File

@@ -93,7 +93,7 @@ void ac_cleanup(TERN_(HAS_MULTI_HOTEND, const uint8_t old_tool_index)) {
93 93
 
94 94
 void print_signed_float(PGM_P const prefix, const float &f) {
95 95
   SERIAL_ECHOPGM("  ");
96
-  serialprintPGM(prefix);
96
+  SERIAL_ECHOPGM_P(prefix);
97 97
   SERIAL_CHAR(':');
98 98
   if (f >= 0) SERIAL_CHAR('+');
99 99
   SERIAL_ECHO_F(f, 2);
@@ -449,7 +449,7 @@ void GcodeSuite::G33() {
449 449
 
450 450
   // Report settings
451 451
   PGM_P const checkingac = PSTR("Checking... AC");
452
-  serialprintPGM(checkingac);
452
+  SERIAL_ECHOPGM_P(checkingac);
453 453
   if (verbose_level == 0) SERIAL_ECHOPGM(" (DRY-RUN)");
454 454
   SERIAL_EOL();
455 455
   ui.set_status_P(checkingac);
@@ -625,7 +625,7 @@ void GcodeSuite::G33() {
625 625
     }
626 626
     else { // dry run
627 627
       PGM_P const enddryrun = PSTR("End DRY-RUN");
628
-      serialprintPGM(enddryrun);
628
+      SERIAL_ECHOPGM_P(enddryrun);
629 629
       SERIAL_ECHO_SP(35);
630 630
       SERIAL_ECHOLNPAIR_F("std dev:", zero_std_dev, 3);
631 631
 

+ 1
- 1
Marlin/src/gcode/calibrate/M852.cpp View File

@@ -93,7 +93,7 @@ void GcodeSuite::M852() {
93 93
 
94 94
   if (!ijk) {
95 95
     SERIAL_ECHO_START();
96
-    serialprintPGM(GET_TEXT(MSG_SKEW_FACTOR));
96
+    SERIAL_ECHOPGM_P(GET_TEXT(MSG_SKEW_FACTOR));
97 97
     SERIAL_ECHOPAIR_F(" XY: ", planner.skew_factor.xy, 6);
98 98
     #if ENABLED(SKEW_CORRECTION_FOR_Z)
99 99
       SERIAL_ECHOPAIR_F(" XZ: ", planner.skew_factor.xz, 6);

+ 1
- 1
Marlin/src/gcode/config/M217.cpp View File

@@ -36,7 +36,7 @@
36 36
 void M217_report(const bool eeprom=false) {
37 37
 
38 38
   #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
39
-    serialprintPGM(eeprom ? PSTR("  M217") : PSTR("Toolchange:"));
39
+    SERIAL_ECHOPGM_P(eeprom ? PSTR("  M217") : PSTR("Toolchange:"));
40 40
     SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length));
41 41
     SERIAL_ECHOPAIR_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
42 42
                       SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),

+ 1
- 1
Marlin/src/gcode/config/M302.cpp View File

@@ -55,7 +55,7 @@ void GcodeSuite::M302() {
55 55
     // Report current state
56 56
     SERIAL_ECHO_START();
57 57
     SERIAL_ECHOPGM("Cold extrudes are ");
58
-    serialprintPGM(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis"));
58
+    SERIAL_ECHOPGM_P(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis"));
59 59
     SERIAL_ECHOLNPAIR("abled (min temp ", thermalManager.extrude_min_temp, "C)");
60 60
   }
61 61
 }

+ 1
- 1
Marlin/src/gcode/config/M43.cpp View File

@@ -303,7 +303,7 @@ void GcodeSuite::M43() {
303 303
   if (parser.seen('E')) {
304 304
     endstops.monitor_flag = parser.value_bool();
305 305
     SERIAL_ECHOPGM("endstop monitor ");
306
-    serialprintPGM(endstops.monitor_flag ? PSTR("en") : PSTR("dis"));
306
+    SERIAL_ECHOPGM_P(endstops.monitor_flag ? PSTR("en") : PSTR("dis"));
307 307
     SERIAL_ECHOLNPGM("abled");
308 308
     return;
309 309
   }

+ 1
- 1
Marlin/src/gcode/control/M111.cpp View File

@@ -49,7 +49,7 @@ void GcodeSuite::M111() {
49 49
     LOOP_L_N(i, COUNT(debug_strings)) {
50 50
       if (TEST(marlin_debug_flags, i)) {
51 51
         if (comma++) SERIAL_CHAR(',');
52
-        serialprintPGM((char*)pgm_read_ptr(&debug_strings[i]));
52
+        SERIAL_ECHOPGM_P((char*)pgm_read_ptr(&debug_strings[i]));
53 53
       }
54 54
     }
55 55
   }

+ 1
- 1
Marlin/src/gcode/control/M80_M81.cpp View File

@@ -56,7 +56,7 @@
56 56
 
57 57
     // S: Report the current power supply state and exit
58 58
     if (parser.seen('S')) {
59
-      serialprintPGM(powersupply_on ? PSTR("PS:1\n") : PSTR("PS:0\n"));
59
+      SERIAL_ECHOPGM_P(powersupply_on ? PSTR("PS:1\n") : PSTR("PS:0\n"));
60 60
       return;
61 61
     }
62 62
 

+ 6
- 6
Marlin/src/gcode/feature/L6470/M122.cpp View File

@@ -41,16 +41,16 @@ inline void L6470_say_status(const L64XX_axis_t axis) {
41 41
     SERIAL_ECHO(temp_buf);
42 42
     print_bin(sh.STATUS_AXIS_RAW);
43 43
     switch (sh.STATUS_AXIS_LAYOUT) {
44
-      case L6470_STATUS_LAYOUT: serialprintPGM(PSTR("   L6470")); break;
45
-      case L6474_STATUS_LAYOUT: serialprintPGM(PSTR("   L6474")); break;
46
-      case L6480_STATUS_LAYOUT: serialprintPGM(PSTR("   L6480/powerSTEP01")); break;
44
+      case L6470_STATUS_LAYOUT: SERIAL_ECHOPGM("   L6470"); break;
45
+      case L6474_STATUS_LAYOUT: SERIAL_ECHOPGM("   L6474"); break;
46
+      case L6480_STATUS_LAYOUT: SERIAL_ECHOPGM("   L6480/powerSTEP01"); break;
47 47
     }
48 48
   #endif
49 49
   SERIAL_ECHOPGM("\n...OUTPUT: ");
50
-  serialprintPGM(sh.STATUS_AXIS & STATUS_HIZ ? PSTR("OFF") : PSTR("ON "));
50
+  SERIAL_ECHOPGM_P(sh.STATUS_AXIS & STATUS_HIZ ? PSTR("OFF") : PSTR("ON "));
51 51
   SERIAL_ECHOPGM("   BUSY: "); echo_yes_no((sh.STATUS_AXIS & STATUS_BUSY) == 0);
52 52
   SERIAL_ECHOPGM("   DIR: ");
53
-  serialprintPGM((((sh.STATUS_AXIS & STATUS_DIR) >> 4) ^ L64xxManager.index_to_dir[axis]) ? PSTR("FORWARD") : PSTR("REVERSE"));
53
+  SERIAL_ECHOPGM_P((((sh.STATUS_AXIS & STATUS_DIR) >> 4) ^ L64xxManager.index_to_dir[axis]) ? PSTR("FORWARD") : PSTR("REVERSE"));
54 54
   if (sh.STATUS_AXIS_LAYOUT == L6480_STATUS_LAYOUT) {
55 55
     SERIAL_ECHOPGM("   Last Command: ");
56 56
     if (sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD) SERIAL_ECHOPGM("VALID");
@@ -67,7 +67,7 @@ inline void L6470_say_status(const L64XX_axis_t axis) {
67 67
     SERIAL_ECHOPGM("   Last Command: ");
68 68
     if (!(sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD)) SERIAL_ECHOPGM("IN");
69 69
     SERIAL_ECHOPGM("VALID    ");
70
-    serialprintPGM(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ?  PSTR("COMPLETED    ") : PSTR("Not PERFORMED"));
70
+    SERIAL_ECHOPGM_P(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ?  PSTR("COMPLETED    ") : PSTR("Not PERFORMED"));
71 71
     SERIAL_ECHOPAIR("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN       " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING        " : "OK             ");
72 72
   }
73 73
   SERIAL_ECHOPGM("   OVERCURRENT:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_OCD) == 0);

+ 1
- 1
Marlin/src/gcode/feature/L6470/M906.cpp View File

@@ -132,7 +132,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
132 132
       SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps,
133 133
                       "   ADC_OUT: ", L6470_ADC_out);
134 134
       SERIAL_ECHOPGM("   Vs_compensation: ");
135
-      serialprintPGM((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? PSTR("ENABLED ") : PSTR("DISABLED"));
135
+      SERIAL_ECHOPGM_P((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? PSTR("ENABLED ") : PSTR("DISABLED"));
136 136
       SERIAL_ECHOLNPAIR("   Compensation coefficient: ~", comp_coef * 0.01f);
137 137
 
138 138
       SERIAL_ECHOPAIR("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD),

+ 1
- 1
Marlin/src/gcode/feature/powerloss/M1000.cpp View File

@@ -40,7 +40,7 @@ void menu_job_recovery();
40 40
 inline void plr_error(PGM_P const prefix) {
41 41
   #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
42 42
     DEBUG_ECHO_START();
43
-    serialprintPGM(prefix);
43
+    DEBUG_ECHOPGM_P(prefix);
44 44
     DEBUG_ECHOLNPGM(" Job Recovery Data");
45 45
   #else
46 46
     UNUSED(prefix);

+ 2
- 2
Marlin/src/gcode/feature/powerloss/M413.cpp View File

@@ -54,8 +54,8 @@ void GcodeSuite::M413() {
54 54
     #if PIN_EXISTS(POWER_LOSS)
55 55
       if (parser.seen('O')) recovery._outage();
56 56
     #endif
57
-    if (parser.seen('E')) serialprintPGM(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n"));
58
-    if (parser.seen('V')) serialprintPGM(recovery.valid() ? PSTR("Valid\n") : PSTR("Invalid\n"));
57
+    if (parser.seen('E')) SERIAL_ECHOPGM_P(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n"));
58
+    if (parser.seen('V')) SERIAL_ECHOPGM_P(recovery.valid() ? PSTR("Valid\n") : PSTR("Invalid\n"));
59 59
   #endif
60 60
 }
61 61
 

+ 1
- 2
Marlin/src/gcode/feature/trinamic/M569.cpp View File

@@ -32,8 +32,7 @@ template<typename TMC>
32 32
 void tmc_say_stealth_status(TMC &st) {
33 33
   st.printLabel();
34 34
   SERIAL_ECHOPGM(" driver mode:\t");
35
-  serialprintPGM(st.get_stealthChop() ? PSTR("stealthChop") : PSTR("spreadCycle"));
36
-  SERIAL_EOL();
35
+  SERIAL_ECHOLNPGM_P(st.get_stealthChop() ? PSTR("stealthChop") : PSTR("spreadCycle"));
37 36
 }
38 37
 template<typename TMC>
39 38
 void tmc_set_stealthChop(TMC &st, const bool enable) {

+ 1
- 1
Marlin/src/gcode/geometry/G17-G19.cpp View File

@@ -29,7 +29,7 @@
29 29
 inline void report_workspace_plane() {
30 30
   SERIAL_ECHO_START();
31 31
   SERIAL_ECHOPGM("Workspace Plane ");
32
-  serialprintPGM(
32
+  SERIAL_ECHOPGM_P(
33 33
       gcode.workspace_plane == GcodeSuite::PLANE_YZ ? PSTR("YZ\n")
34 34
     : gcode.workspace_plane == GcodeSuite::PLANE_ZX ? PSTR("ZX\n")
35 35
                                                     : PSTR("XY\n")

+ 2
- 2
Marlin/src/gcode/host/M115.cpp View File

@@ -34,8 +34,8 @@
34 34
 #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
35 35
   static void cap_line(PGM_P const name, bool ena=false) {
36 36
     SERIAL_ECHOPGM("Cap:");
37
-    serialprintPGM(name);
38
-    SERIAL_CHAR(':', ena ? '1' : '0');
37
+    SERIAL_ECHOPGM_P(name);
38
+    SERIAL_CHAR(':', '0' + ena);
39 39
     SERIAL_EOL();
40 40
   }
41 41
 #endif

+ 2
- 3
Marlin/src/gcode/host/M360.cpp View File

@@ -34,10 +34,9 @@
34 34
 
35 35
 static void config_prefix(PGM_P const name, PGM_P const pref=nullptr, const int8_t ind=-1) {
36 36
   SERIAL_ECHOPGM("Config:");
37
-  if (pref) serialprintPGM(pref);
37
+  if (pref) SERIAL_ECHOPGM_P(pref);
38 38
   if (ind >= 0) { SERIAL_ECHO(ind); SERIAL_CHAR(':'); }
39
-  serialprintPGM(name);
40
-  SERIAL_CHAR(':');
39
+  SERIAL_ECHOPAIR_P(name, AS_CHAR(':'));
41 40
 }
42 41
 static void config_line(PGM_P const name, const float val, PGM_P const pref=nullptr, const int8_t ind=-1) {
43 42
   config_prefix(name, pref, ind);

+ 1
- 2
Marlin/src/gcode/queue.cpp View File

@@ -304,8 +304,7 @@ inline int read_serial(const uint8_t index) { return SERIAL_IMPL.read(index); }
304 304
 void GCodeQueue::gcode_line_error(PGM_P const err, const serial_index_t serial_ind) {
305 305
   PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command
306 306
   SERIAL_ERROR_START();
307
-  SERIAL_ECHOPGM_P(err);
308
-  SERIAL_ECHOLN(serial_state[serial_ind].last_N);
307
+  SERIAL_ECHOLNPAIR_P(err, serial_state[serial_ind].last_N);
309 308
   while (read_serial(serial_ind) != -1) { /* nada */ } // Clear out the RX buffer. Why don't use flush here ?
310 309
   flush_and_request_resend();
311 310
   serial_state[serial_ind].count = 0;

+ 1
- 1
Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp View File

@@ -290,7 +290,7 @@ namespace Anycubic {
290 290
 
291 291
   void ChironTFT::SendtoTFT(PGM_P str) {  // A helper to print PROGMEN string to the panel
292 292
     #if ACDEBUG(AC_SOME)
293
-      serialprintPGM(str);
293
+      SERIAL_ECHOPGM_P(str);
294 294
     #endif
295 295
     while (const char c = pgm_read_byte(str++)) TFTSer.write(c);
296 296
   }

+ 4
- 4
Marlin/src/libs/L64XX/L64XX_Marlin.cpp View File

@@ -37,8 +37,6 @@ L64XX_Marlin L64xxManager;
37 37
 #include "../../module/planner.h"
38 38
 #include "../../HAL/shared/Delay.h"
39 39
 
40
-void echo_yes_no(const bool yes) { serialprintPGM(yes ? PSTR(" YES") : PSTR(" NO ")); }
41
-
42 40
 static const char str_X[] PROGMEM = "X ",  str_Y[] PROGMEM = "Y ",  str_Z[] PROGMEM = "Z ",
43 41
                  str_X2[] PROGMEM = "X2", str_Y2[] PROGMEM = "Y2",
44 42
                  str_Z2[] PROGMEM = "Z2", str_Z3[] PROGMEM = "Z3", str_Z4[] PROGMEM = "Z4",
@@ -56,6 +54,8 @@ PGM_P const L64XX_Marlin::index_to_axis[] PROGMEM = {
56 54
 #define DEBUG_OUT ENABLED(L6470_CHITCHAT)
57 55
 #include "../../core/debug_out.h"
58 56
 
57
+void echo_yes_no(const bool yes) { DEBUG_ECHOPGM_P(yes ? PSTR(" YES") : PSTR(" NO ")); UNUSED(yes); }
58
+
59 59
 uint8_t L64XX_Marlin::dir_commands[MAX_L64XX];  // array to hold direction command for each driver
60 60
 
61 61
 const uint8_t L64XX_Marlin::index_to_dir[MAX_L64XX] = {
@@ -375,7 +375,7 @@ inline void echo_min_max(const char a, const float &min, const float &max) {
375 375
 }
376 376
 inline void echo_oct_used(const float &oct, const uint8_t stall) {
377 377
   DEBUG_ECHOPAIR("over_current_threshold used     : ", oct);
378
-  serialprintPGM(stall ? PSTR("  (Stall") : PSTR("  (OCD"));
378
+  DEBUG_ECHOPGM_P(stall ? PSTR("  (Stall") : PSTR("  (OCD"));
379 379
   DEBUG_ECHOLNPGM(" threshold)");
380 380
 }
381 381
 inline void err_out_of_bounds() { DEBUG_ECHOLNPGM("Test aborted - motion out of bounds"); }
@@ -652,7 +652,7 @@ void L64XX_Marlin::say_axis(const L64XX_axis_t axis, const uint8_t label/*=true*
652 652
   ) {
653 653
     say_axis(axis);
654 654
     DEBUG_ECHOPGM("  THERMAL: ");
655
-    serialprintPGM((status & _status_axis_th_sd) ? PSTR("SHUTDOWN") : (status & _status_axis_th_wrn) ? PSTR("WARNING ") : PSTR("OK      "));
655
+    DEBUG_ECHOPGM_P((status & _status_axis_th_sd) ? PSTR("SHUTDOWN") : (status & _status_axis_th_wrn) ? PSTR("WARNING ") : PSTR("OK      "));
656 656
     DEBUG_ECHOPGM("   OVERCURRENT: ");
657 657
     echo_yes_no((status & _status_axis_ocd) != 0);
658 658
     if (!(_status_axis_layout == L6474_STATUS_LAYOUT)) {  // L6474 doesn't have these bits

+ 1
- 1
Marlin/src/libs/stopwatch.cpp View File

@@ -98,7 +98,7 @@ millis_t Stopwatch::duration() {
98 98
   void Stopwatch::debug(const char func[]) {
99 99
     if (DEBUGGING(INFO)) {
100 100
       SERIAL_ECHOPGM("Stopwatch::");
101
-      serialprintPGM(func);
101
+      SERIAL_ECHOPGM_P(func);
102 102
       SERIAL_ECHOLNPGM("()");
103 103
     }
104 104
   }

+ 2
- 5
Marlin/src/libs/vector_3.cpp View File

@@ -77,7 +77,7 @@ void vector_3::apply_rotation(const matrix_3x3 &matrix) {
77 77
 }
78 78
 
79 79
 void vector_3::debug(PGM_P const title) {
80
-  serialprintPGM(title);
80
+  SERIAL_ECHOPGM_P(title);
81 81
   SERIAL_ECHOPAIR_F_P(SP_X_STR, x, 6);
82 82
   SERIAL_ECHOPAIR_F_P(SP_Y_STR, y, 6);
83 83
   SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z, 6);
@@ -139,10 +139,7 @@ matrix_3x3 matrix_3x3::transpose(const matrix_3x3 &original) {
139 139
 }
140 140
 
141 141
 void matrix_3x3::debug(PGM_P const title) {
142
-  if (title) {
143
-    serialprintPGM(title);
144
-    SERIAL_EOL();
145
-  }
142
+  if (title) SERIAL_ECHOLNPGM_P(title);
146 143
   LOOP_L_N(i, 3) {
147 144
     LOOP_L_N(j, 3) {
148 145
       if (vectors[i][j] >= 0.0) SERIAL_CHAR('+');

+ 2
- 3
Marlin/src/module/endstops.cpp View File

@@ -405,10 +405,9 @@ void Endstops::event_handler() {
405 405
 }
406 406
 
407 407
 static void print_es_state(const bool is_hit, PGM_P const label=nullptr) {
408
-  if (label) serialprintPGM(label);
408
+  if (label) SERIAL_ECHOPGM_P(label);
409 409
   SERIAL_ECHOPGM(": ");
410
-  serialprintPGM(is_hit ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN));
411
-  SERIAL_EOL();
410
+  SERIAL_ECHOLNPGM_P(is_hit ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN));
412 411
 }
413 412
 
414 413
 void _O2 Endstops::report_states() {

+ 1
- 1
Marlin/src/module/planner.cpp View File

@@ -2973,7 +2973,7 @@ inline void limit_and_warn(float &val, const uint8_t axis, PGM_P const setting_n
2973 2973
   if (before != val) {
2974 2974
     SERIAL_CHAR(axis_codes[lim_axis]);
2975 2975
     SERIAL_ECHOPGM(" Max ");
2976
-    serialprintPGM(setting_name);
2976
+    SERIAL_ECHOPGM_P(setting_name);
2977 2977
     SERIAL_ECHOLNPAIR(" limited to ", val);
2978 2978
   }
2979 2979
 }

+ 3
- 3
Marlin/src/module/printcounter.cpp View File

@@ -118,7 +118,7 @@ void PrintCounter::initStats() {
118 118
   inline bool _service_warn(const char * const msg) {
119 119
     _print_divider();
120 120
     SERIAL_ECHO_START();
121
-    serialprintPGM(msg);
121
+    SERIAL_ECHOPGM_P(msg);
122 122
     SERIAL_ECHOLNPGM("!");
123 123
     _print_divider();
124 124
     return true;
@@ -177,7 +177,7 @@ void PrintCounter::saveStats() {
177 177
 #if HAS_SERVICE_INTERVALS
178 178
   inline void _service_when(char buffer[], const char * const msg, const uint32_t when) {
179 179
     SERIAL_ECHOPGM(STR_STATS);
180
-    serialprintPGM(msg);
180
+    SERIAL_ECHOPGM_P(msg);
181 181
     SERIAL_ECHOLNPAIR(" in ", duration_t(when).toString(buffer));
182 182
   }
183 183
 #endif
@@ -339,7 +339,7 @@ void PrintCounter::reset() {
339 339
   void PrintCounter::debug(const char func[]) {
340 340
     if (DEBUGGING(INFO)) {
341 341
       SERIAL_ECHOPGM("PrintCounter::");
342
-      serialprintPGM(func);
342
+      SERIAL_ECHOPGM_P(func);
343 343
       SERIAL_ECHOLNPGM("()");
344 344
     }
345 345
   }

+ 2
- 3
Marlin/src/module/probe.cpp View File

@@ -279,8 +279,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
279 279
       PGM_P const ds_str = deploy ? GET_TEXT(MSG_MANUAL_DEPLOY) : GET_TEXT(MSG_MANUAL_STOW);
280 280
       ui.return_to_status();       // To display the new status message
281 281
       ui.set_status_P(ds_str, 99);
282
-      serialprintPGM(ds_str);
283
-      SERIAL_EOL();
282
+      SERIAL_ECHOLNPGM_P(ds_str);
284 283
 
285 284
       TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), CONTINUE_STR));
286 285
       TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Stow Probe")));
@@ -586,7 +585,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) {
586 585
                early_fail = (scheck && current_position.z > -offset.z + clearance); // Probe triggered too high?
587 586
     #if ENABLED(DEBUG_LEVELING_FEATURE)
588 587
       if (DEBUGGING(LEVELING) && (probe_fail || early_fail)) {
589
-        DEBUG_PRINT_P(plbl);
588
+        DEBUG_ECHOPGM_P(plbl);
590 589
         DEBUG_ECHOPGM(" Probe fail! -");
591 590
         if (probe_fail) DEBUG_ECHOPGM(" No trigger.");
592 591
         if (early_fail) DEBUG_ECHOPGM(" Triggered early.");

+ 6
- 6
Marlin/src/module/settings.cpp View File

@@ -2990,7 +2990,7 @@ void MarlinSettings::reset() {
2990 2990
     if (!repl) {
2991 2991
       SERIAL_ECHO_START();
2992 2992
       SERIAL_ECHOPGM("; ");
2993
-      serialprintPGM(pstr);
2993
+      SERIAL_ECHOPGM_P(pstr);
2994 2994
       if (eol) SERIAL_EOL();
2995 2995
     }
2996 2996
   }
@@ -3007,7 +3007,7 @@ void MarlinSettings::reset() {
3007 3007
         SERIAL_ECHOPGM("  M569 S1");
3008 3008
         if (etc) {
3009 3009
           SERIAL_CHAR(' ');
3010
-          serialprintPGM(etc);
3010
+          SERIAL_ECHOPGM_P(etc);
3011 3011
         }
3012 3012
         if (newLine) SERIAL_EOL();
3013 3013
       }
@@ -3025,7 +3025,7 @@ void MarlinSettings::reset() {
3025 3025
   #endif
3026 3026
 
3027 3027
   inline void say_units(const bool colon) {
3028
-    serialprintPGM(
3028
+    SERIAL_ECHOPGM_P(
3029 3029
       #if ENABLED(INCH_MODE_SUPPORT)
3030 3030
         parser.linear_unit_factor != 1.0 ? PSTR(" (in)") :
3031 3031
       #endif
@@ -3066,7 +3066,7 @@ void MarlinSettings::reset() {
3066 3066
         SERIAL_ECHOPGM("  M149 ");
3067 3067
         SERIAL_CHAR(parser.temp_units_code());
3068 3068
         SERIAL_ECHOPGM(" ; Units in ");
3069
-        serialprintPGM(parser.temp_units_name());
3069
+        SERIAL_ECHOPGM_P(parser.temp_units_name());
3070 3070
       #else
3071 3071
         SERIAL_ECHOLNPGM("  M149 C ; Units in Celsius");
3072 3072
       #endif
@@ -3254,12 +3254,12 @@ void MarlinSettings::reset() {
3254 3254
           LOOP_L_N(py, GRID_MAX_POINTS_Y) {
3255 3255
             LOOP_L_N(px, GRID_MAX_POINTS_X) {
3256 3256
               CONFIG_ECHO_START();
3257
-              SERIAL_ECHOPAIR_P(PSTR("  G29 S3 I"), px, PSTR(" J"), py);
3257
+              SERIAL_ECHOPAIR("  G29 S3 I", px, " J", py);
3258 3258
               SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(mbl.z_values[px][py]), 5);
3259 3259
             }
3260 3260
           }
3261 3261
           CONFIG_ECHO_START();
3262
-          SERIAL_ECHOLNPAIR_F_P(PSTR("  G29 S4 Z"), LINEAR_UNIT(mbl.z_offset), 5);
3262
+          SERIAL_ECHOLNPAIR_F("  G29 S4 Z", LINEAR_UNIT(mbl.z_offset), 5);
3263 3263
         }
3264 3264
 
3265 3265
       #elif ENABLED(AUTO_BED_LEVELING_UBL)

+ 5
- 5
Marlin/src/module/temperature.cpp View File

@@ -664,9 +664,9 @@ volatile bool Temperature::raw_temps_ready = false;
664 664
 
665 665
         #if EITHER(PIDTEMPBED, PIDTEMPCHAMBER)
666 666
           PGM_P const estring = GHV(PSTR("chamber"), PSTR("bed"), NUL_STR);
667
-          say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
668
-          say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
669
-          say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd);
667
+          say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
668
+          say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
669
+          say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd);
670 670
         #else
671 671
           say_default_(); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
672 672
           say_default_(); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
@@ -868,7 +868,7 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms
868 868
 
869 869
   if (IsRunning() && TERN1(BOGUS_TEMPERATURE_GRACE_PERIOD, killed == 2)) {
870 870
     SERIAL_ERROR_START();
871
-    serialprintPGM(serial_msg);
871
+    SERIAL_ECHOPGM_P(serial_msg);
872 872
     SERIAL_ECHOPGM(STR_STOPPED_HEATER);
873 873
     if (heater_id >= 0)
874 874
       SERIAL_ECHO(heater_id);
@@ -1532,7 +1532,7 @@ void Temperature::manage_heater() {
1532 1532
     SERIAL_ECHOPAIR_F_P(SP_B_STR, t.beta, 1);
1533 1533
     SERIAL_ECHOPAIR_F_P(SP_C_STR, t.sh_c_coeff, 9);
1534 1534
     SERIAL_ECHOPGM(" ; ");
1535
-    serialprintPGM(
1535
+    SERIAL_ECHOPGM_P(
1536 1536
       TERN_(TEMP_SENSOR_0_IS_CUSTOM, t_index == CTI_HOTEND_0 ? PSTR("HOTEND 0") :)
1537 1537
       TERN_(TEMP_SENSOR_1_IS_CUSTOM, t_index == CTI_HOTEND_1 ? PSTR("HOTEND 1") :)
1538 1538
       TERN_(TEMP_SENSOR_2_IS_CUSTOM, t_index == CTI_HOTEND_2 ? PSTR("HOTEND 2") :)

+ 5
- 5
Marlin/src/pins/pinsDebug.h View File

@@ -238,7 +238,7 @@ const PinInfo pin_array[] PROGMEM = {
238 238
 #endif
239 239
 
240 240
 static void print_input_or_output(const bool isout) {
241
-  serialprintPGM(isout ? PSTR("Output = ") : PSTR("Input  = "));
241
+  SERIAL_ECHOPGM_P(isout ? PSTR("Output = ") : PSTR("Input  = "));
242 242
 }
243 243
 
244 244
 // pretty report with PWM info
@@ -266,8 +266,8 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
266 266
   LOOP_L_N(x, COUNT(pin_array))  {    // scan entire array and report all instances of this pin
267 267
     if (GET_ARRAY_PIN(x) == pin) {
268 268
       if (!found) {    // report digital and analog pin number only on the first time through
269
-        if (start_string) serialprintPGM(start_string);
270
-        serialprintPGM(PSTR("PIN: "));
269
+        if (start_string) SERIAL_ECHOPGM_P(start_string);
270
+        SERIAL_ECHOPGM("PIN: ");
271 271
         PRINT_PIN(pin);
272 272
         PRINT_PORT(pin);
273 273
         if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {
@@ -317,8 +317,8 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
317 317
   } // end of for loop
318 318
 
319 319
   if (!found) {
320
-    if (start_string) serialprintPGM(start_string);
321
-    serialprintPGM(PSTR("PIN: "));
320
+    if (start_string) SERIAL_ECHOPGM_P(start_string);
321
+    SERIAL_ECHOPGM("PIN: ");
322 322
     PRINT_PIN(pin);
323 323
     PRINT_PORT(pin);
324 324
     if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) {

+ 2
- 2
Marlin/src/sd/cardreader.cpp View File

@@ -552,7 +552,7 @@ void announceOpen(const uint8_t doing, const char * const path) {
552 552
     PORT_REDIRECT(SERIAL_ALL);
553 553
     SERIAL_ECHO_START();
554 554
     SERIAL_ECHOPGM("Now ");
555
-    serialprintPGM(doing == 1 ? PSTR("doing") : PSTR("fresh"));
555
+    SERIAL_ECHOPGM_P(doing == 1 ? PSTR("doing") : PSTR("fresh"));
556 556
     SERIAL_ECHOLNPAIR(" file: ", path);
557 557
   }
558 558
 }
@@ -1251,7 +1251,7 @@ void CardReader::fileHasFinished() {
1251 1251
       removeFile(recovery.filename);
1252 1252
       #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
1253 1253
         SERIAL_ECHOPGM("Power-loss file delete");
1254
-        serialprintPGM(jobRecoverFileExists() ? PSTR(" failed.\n") : PSTR("d.\n"));
1254
+        SERIAL_ECHOPGM_P(jobRecoverFileExists() ? PSTR(" failed.\n") : PSTR("d.\n"));
1255 1255
       #endif
1256 1256
     }
1257 1257
   }

Loading…
Cancel
Save