kout
This commit is contained in:
@@ -5,8 +5,11 @@ SerialStream::SerialStream(ComPort port, BaudRate baud_rate, DataBits data_bits,
|
||||
StopBits stop_bits, Parity parity)
|
||||
:Serial(port, baud_rate, data_bits, stop_bits, parity) {}
|
||||
|
||||
SerialStream kout = SerialStream();
|
||||
|
||||
void SerialStream::flush() {
|
||||
print(buffer, strlen(buffer));
|
||||
print(buffer, pos);
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/questions/3440726/what-is-the-proper-way-of-implementing-a-good-itoa-function
|
||||
|
||||
@@ -141,3 +141,6 @@ class SerialStream : public OutputStream, public Serial {
|
||||
*/
|
||||
void print(char* str, int length);
|
||||
};
|
||||
|
||||
extern SerialStream kout;
|
||||
|
||||
|
||||
@@ -15,7 +15,4 @@ TextStream::TextStream(unsigned from_col,
|
||||
void TextStream::flush() {
|
||||
print(buffer,pos);
|
||||
pos = 0;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user