test app implementation for os

This commit is contained in:
tkl
2016-08-02 14:10:11 +02:00
parent 35af737f68
commit 1859174c9c
10 changed files with 295 additions and 14 deletions

View File

@@ -52,7 +52,8 @@ static void rx_func(void *arg)
ret = read(shell_object.shell_device, &buffer[index],
sizeof(buffer) / sizeof(buffer[0]) - index);
if(ret) {
if(buffer[index + ret - 1] == '\n') {
if((buffer[index + ret - 1] == '\n') || (buffer[index + ret - 1] == '\r')) {
buffer[index + ret - 1] = '\n';
parse(buffer, index + ret);
index = 0;
}