1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Tweak serial.h

This commit is contained in:
Scott Lahteine 2018-02-16 17:54:07 -06:00
parent 12628d43ce
commit ba4a17f251

View File

@ -83,6 +83,13 @@ extern const char errormagic[] PROGMEM;
#define SERIAL_ECHOPAIR_F(pre,value) SERIAL_ECHOPAIR(pre, FIXFLOAT(value))
#define SERIAL_ECHOLNPAIR_F(pre, value) SERIAL_ECHOLNPAIR(pre, FIXFLOAT(value))
//
// Functions for serial printing from PROGMEM. (Saves loads of SRAM.)
//
FORCE_INLINE void serialprintPGM(const char* str) {
while (char ch = pgm_read_byte(str++)) SERIAL_CHAR(ch);
}
void serial_echopair_PGM(const char* s_P, const char *v);
void serial_echopair_PGM(const char* s_P, char v);
void serial_echopair_PGM(const char* s_P, int v);
@ -101,11 +108,4 @@ void serial_spaces(uint8_t count);
#define SERIAL_ERROR_SP(C) serial_spaces(C)
#define SERIAL_PROTOCOL_SP(C) serial_spaces(C)
//
// Functions for serial printing from PROGMEM. (Saves loads of SRAM.)
//
FORCE_INLINE void serialprintPGM(const char* str) {
while (char ch = pgm_read_byte(str++)) MYSERIAL0.write(ch);
}
#endif // __SERIAL_H__