Last active
March 9, 2019 22:24
-
-
Save aster94/6bb1d1808686c1e7e7674f6ddded49e3 to your computer and use it in GitHub Desktop.
UniversalSerial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomSerial { | |
private: | |
Stream &stream; | |
public: | |
CustomSerial(Stream &_stream) : stream(_stream) {} | |
int read() { | |
return stream.read(); | |
} | |
int available() { | |
return stream.available(); | |
} | |
void write(byte b) { | |
stream.write(b); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment