-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path_dd_serial.h
More file actions
38 lines (33 loc) · 719 Bytes
/
_dd_serial.h
File metadata and controls
38 lines (33 loc) · 719 Bytes
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
#ifndef _dd_serial_h
#define _dd_serial_h
// #ifdef DD_4_ESP32
// #include <esp_spp_api.h>
// #include "HardwareSerial.h"
// #endif
/// Class for internal use only
class DDSerial {
public:
virtual void begin(unsigned long serialBaud) {
Serial.begin(serialBaud);
}
virtual bool available() {
return Serial.available();
}
virtual char read() {
return Serial.read();
}
virtual void print(const String &s) {
Serial.print(s);
}
virtual void print(const char *p) {
Serial.print(p);
}
virtual void write(uint8_t b) {
Serial.write(b);
}
virtual void flush() {
Serial.flush();
}
};
//extern DDSerial* _The_DD_Serial;
#endif