Add code_value_short and SERIAL_CHAR
This commit is contained in:
@ -62,31 +62,33 @@
|
||||
#define MYSERIAL MSerial
|
||||
#endif
|
||||
|
||||
#define SERIAL_PROTOCOL(x) (MYSERIAL.print(x))
|
||||
#define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y))
|
||||
#define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))
|
||||
#define SERIAL_PROTOCOLLN(x) (MYSERIAL.print(x),MYSERIAL.write('\n'))
|
||||
#define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n'))
|
||||
#define SERIAL_CHAR(x) MYSERIAL.write(x)
|
||||
#define SERIAL_EOL SERIAL_CHAR('\n')
|
||||
|
||||
#define SERIAL_PROTOCOLCHAR(x) SERIAL_CHAR(x)
|
||||
#define SERIAL_PROTOCOL(x) MYSERIAL.print(x)
|
||||
#define SERIAL_PROTOCOL_F(x,y) MYSERIAL.print(x,y)
|
||||
#define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x))
|
||||
#define SERIAL_PROTOCOLLN(x) do{ MYSERIAL.print(x),MYSERIAL.write('\n'); }while(0)
|
||||
#define SERIAL_PROTOCOLLNPGM(x) do{ serialprintPGM(PSTR(x)),MYSERIAL.write('\n'); }while(0)
|
||||
|
||||
|
||||
extern const char errormagic[] PROGMEM;
|
||||
extern const char echomagic[] PROGMEM;
|
||||
|
||||
#define SERIAL_ERROR_START (serialprintPGM(errormagic))
|
||||
#define SERIAL_ERROR_START serialprintPGM(errormagic)
|
||||
#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
|
||||
#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
|
||||
#define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x)
|
||||
#define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
|
||||
|
||||
#define SERIAL_ECHO_START (serialprintPGM(echomagic))
|
||||
#define SERIAL_ECHO_START serialprintPGM(echomagic)
|
||||
#define SERIAL_ECHO(x) SERIAL_PROTOCOL(x)
|
||||
#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x)
|
||||
#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x)
|
||||
#define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
|
||||
|
||||
#define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value)))
|
||||
|
||||
#define SERIAL_EOL MYSERIAL.write('\n')
|
||||
#define SERIAL_ECHOPAIR(name,value) do{ serial_echopair_P(PSTR(name),(value)); }while(0)
|
||||
|
||||
void serial_echopair_P(const char *s_P, float v);
|
||||
void serial_echopair_P(const char *s_P, double v);
|
||||
|
Reference in New Issue
Block a user