This commit is contained in:
Eggert Jung
2025-04-23 01:31:43 +02:00
parent 5ae907ca5a
commit 91d7affc23
7 changed files with 49 additions and 24 deletions

View File

@@ -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

View File

@@ -141,3 +141,6 @@ class SerialStream : public OutputStream, public Serial {
*/
void print(char* str, int length);
};
extern SerialStream kout;

View File

@@ -15,7 +15,4 @@ TextStream::TextStream(unsigned from_col,
void TextStream::flush() {
print(buffer,pos);
pos = 0;
}