-
Notifications
You must be signed in to change notification settings - Fork 0
/
90_debug.ino
63 lines (48 loc) · 1014 Bytes
/
90_debug.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// set serial
inline void debugInit () {
#ifdef USE_SERIAL
Serial.begin(SERIAL_SPEED); // while (!Serial) { yield(); }
#endif
#ifdef USE_SERIAL1
Serial1.begin(SERIAL_SPEED); //while (!Serial1) { yield(); }
#endif
// delay(2000);
}
// Serial.print
inline void debugPrintTXT (const char* output) {
#ifdef USE_SERIAL
Serial.print(output);
#endif
#ifdef USE_SERIAL1
Serial1.print(output);
#endif
}
// Serial.println
inline void debugPrintTXTln (const char* output) {
#ifdef USE_SERIAL
Serial.println(output);
#endif
#ifdef USE_SERIAL1
Serial1.println(output);
#endif
}
// Serial.print
inline void debugPrintNUMBER (const int32_t output) {
#ifdef USE_SERIAL
Serial.print(output);
#endif
#ifdef USE_SERIAL1
Serial1.print(output);
#endif
}
// Serial.print(nn,HEX)
inline void debugPrintNUMBERHEX (const int32_t output) {
#ifdef USE_SERIAL
Serial.print("$");
Serial.print(output, HEX);
#endif
#ifdef USE_SERIAL1
Serial1.print("$");
Serial1.print(output, HEX);
#endif
}