|
@@ -60,35 +60,34 @@
|
60
|
60
|
#include "stopwatch.h"
|
61
|
61
|
#endif
|
62
|
62
|
|
63
|
|
-#define SERIAL_CHAR(x) MYSERIAL.write(x)
|
64
|
|
-#define SERIAL_EOL SERIAL_CHAR('\n')
|
65
|
|
-
|
66
|
|
-#define SERIAL_PROTOCOLCHAR(x) SERIAL_CHAR(x)
|
67
|
|
-#define SERIAL_PROTOCOL(x) MYSERIAL.print(x)
|
68
|
|
-#define SERIAL_PROTOCOL_F(x,y) MYSERIAL.print(x,y)
|
69
|
|
-#define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x))
|
70
|
|
-#define SERIAL_PROTOCOLLN(x) do{ MYSERIAL.print(x); SERIAL_EOL; }while(0)
|
71
|
|
-#define SERIAL_PROTOCOLLNPGM(x) do{ serialprintPGM(PSTR(x "\n")); }while(0)
|
72
|
|
-
|
73
|
|
-#define SERIAL_PROTOCOLPAIR(name, value) SERIAL_ECHOPAIR(name, value)
|
74
|
|
-#define SERIAL_PROTOCOLLNPAIR(name, value) do{ SERIAL_ECHOPAIR(name, value); SERIAL_EOL; }while(0)
|
75
|
|
-
|
76
|
|
-extern const char errormagic[] PROGMEM;
|
77
|
63
|
extern const char echomagic[] PROGMEM;
|
|
64
|
+extern const char errormagic[] PROGMEM;
|
78
|
65
|
|
79
|
|
-#define SERIAL_ERROR_START serialprintPGM(errormagic)
|
80
|
|
-#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
|
81
|
|
-#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
|
82
|
|
-#define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x)
|
83
|
|
-#define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
|
84
|
|
-
|
85
|
|
-#define SERIAL_ECHO_START serialprintPGM(echomagic)
|
86
|
|
-#define SERIAL_ECHO(x) SERIAL_PROTOCOL(x)
|
87
|
|
-#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x)
|
88
|
|
-#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x)
|
89
|
|
-#define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
|
|
66
|
+#define SERIAL_CHAR(x) (MYSERIAL.write(x))
|
|
67
|
+#define SERIAL_EOL SERIAL_CHAR('\n')
|
90
|
68
|
|
91
|
|
-#define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value)))
|
|
69
|
+#define SERIAL_PROTOCOLCHAR(x) SERIAL_CHAR(x)
|
|
70
|
+#define SERIAL_PROTOCOL(x) (MYSERIAL.print(x))
|
|
71
|
+#define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y))
|
|
72
|
+#define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))
|
|
73
|
+#define SERIAL_PROTOCOLLN(x) do{ MYSERIAL.print(x); SERIAL_EOL; }while(0)
|
|
74
|
+#define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x "\n")))
|
|
75
|
+#define SERIAL_PROTOCOLPAIR(name, value) (serial_echopair_P(PSTR(name),(value)))
|
|
76
|
+#define SERIAL_PROTOCOLLNPAIR(name, value) do{ SERIAL_PROTOCOLPAIR(name, value); SERIAL_EOL; }while(0)
|
|
77
|
+
|
|
78
|
+#define SERIAL_ECHO_START (serialprintPGM(echomagic))
|
|
79
|
+#define SERIAL_ECHO(x) SERIAL_PROTOCOL(x)
|
|
80
|
+#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x)
|
|
81
|
+#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x)
|
|
82
|
+#define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
|
|
83
|
+#define SERIAL_ECHOPAIR(name,value) SERIAL_PROTOCOLPAIR(name, value)
|
|
84
|
+#define SERIAL_ECHOLNPAIR(name, value) SERIAL_PROTOCOLLNPAIR(name, value)
|
|
85
|
+
|
|
86
|
+#define SERIAL_ERROR_START (serialprintPGM(errormagic))
|
|
87
|
+#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
|
|
88
|
+#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
|
|
89
|
+#define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x)
|
|
90
|
+#define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
|
92
|
91
|
|
93
|
92
|
void serial_echopair_P(const char* s_P, const char *v);
|
94
|
93
|
void serial_echopair_P(const char* s_P, char v);
|