Add uartPutLine() function
This commit is contained in:
parent
cf5784f6bc
commit
10111979a8
5 changed files with 28 additions and 15 deletions
|
|
@ -15,7 +15,7 @@ void parseNextCommand() {
|
|||
|
||||
// Read next command
|
||||
CommandLine cmdLine = readNextCommand(buffer, bufferLength);
|
||||
|
||||
|
||||
// Execute command
|
||||
executeCommand(cmdLine);
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ CommandLine readNextCommand(char* buffer, uint8_t bufferLength) {
|
|||
|
||||
if (readChars >= bufferLength - 1) {
|
||||
// Reading was aborted after bufferLength-1 characters to prevent buffer overflow.
|
||||
uartPutString("ERR buffer overflow, discarding line\r\n");
|
||||
uartPutLine("ERR buffer overflow, discarding line");
|
||||
|
||||
// Discard everything until we read an actual end of line
|
||||
for (unsigned char c = 0; c != '\n' && c != '\r'; c = uartGetChar());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue