1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 20:18:52 +00:00

Use pgm_read_ptr for tables of pointers

This commit is contained in:
Scott Lahteine 2018-03-23 02:17:51 -04:00
parent 2746eb589e
commit 94badcbace
2 changed files with 2 additions and 2 deletions

View File

@ -8138,7 +8138,7 @@ inline void gcode_M111() {
for (uint8_t i = 0; i < COUNT(debug_strings); i++) { for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
if (TEST(marlin_debug_flags, i)) { if (TEST(marlin_debug_flags, i)) {
if (comma++) SERIAL_CHAR(','); if (comma++) SERIAL_CHAR(',');
serialprintPGM((char*)pgm_read_word(&debug_strings[i])); serialprintPGM((char*)pgm_read_ptr(&debug_strings[i]));
} }
} }
} }

View File

@ -221,7 +221,7 @@ void _tmc_say_axis(const TMC_AxisEnum axis) {
ext_E2[] PROGMEM = "E2", ext_E3[] PROGMEM = "E3", ext_E2[] PROGMEM = "E2", ext_E3[] PROGMEM = "E3",
ext_E4[] PROGMEM = "E4"; ext_E4[] PROGMEM = "E4";
const static char* const tmc_axes[] PROGMEM = { ext_X, ext_Y, ext_Z, ext_X2, ext_Y2, ext_Z2, ext_E0, ext_E1, ext_E2, ext_E3, ext_E4 }; const static char* const tmc_axes[] PROGMEM = { ext_X, ext_Y, ext_Z, ext_X2, ext_Y2, ext_Z2, ext_E0, ext_E1, ext_E2, ext_E3, ext_E4 };
serialprintPGM((char*)pgm_read_word(&tmc_axes[axis])); serialprintPGM((char*)pgm_read_ptr(&tmc_axes[axis]));
} }
void _tmc_say_current(const TMC_AxisEnum axis, const uint16_t curr) { void _tmc_say_current(const TMC_AxisEnum axis, const uint16_t curr) {