[drv.uart] Read everything from the channel in uartnnMake sure to keep reading until the channel is empty so output isn't behindnby a keystroke.

This commit is contained in:
2024-04-26 00:32:06 -07:00
parent 182d3b0a6a
commit 3b9efc11d0
5 changed files with 25 additions and 26 deletions

View File

@@ -37,17 +37,13 @@ gather_command(j6::channel &cout, j6::ring_buffer &buf)
while (i < n) {
start[i] = input[i];
outp[i] = input[i];
j6::syslog(j6::logs::app, j6::log_level::spam, "Read: %x", start[i]);
if (start[i++] == '\r') {
newline = true;
break;
}
}
size_t written = i;
if (newline)
outp[written++] = '\n';
cout.commit(written);
cout.commit(i);
cout.consume(i);
if (newline)