-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSerialStream.h
More file actions
27 lines (24 loc) · 813 Bytes
/
Copy pathSerialStream.h
File metadata and controls
27 lines (24 loc) · 813 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
#include <Arduino.h>
class stream
{
friend stream &endl(stream &ost);
private:
String reader(int blocks);
bool blocker(int blocks, char chr);
public:
HardwareSerial *fu;
stream(HardwareSerial *f);
stream &operator<<(stream & (*op)(stream &));
const stream &operator<<(const char *str);
const stream &operator<<(const String &str);
const stream &operator<<(const int &num);
const stream &operator<<(const char &chr);
const stream &operator<<(const float &num);
const stream &operator<<(const byte &b);
const stream &operator>>(String &str);
const stream &operator>>(int &str);
const stream &operator>>(char &chr);
const stream &operator>>(float &flt);
const stream &operator>>(byte &b) ;
};
stream &endl(stream &ost);