Fixed UART RX problems

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@232 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-04 12:54:11 +00:00
parent 73a391f720
commit 8b315602e9
7 changed files with 115 additions and 51 deletions

View File

@@ -327,6 +327,12 @@ static void loggerTask(void* parameters)
IODevice_write(loggerDevice, str, strlen(str));
#endif
char buffer[5] = {0,};
size_t actualLength = 0;
IODevice_read(loggerDevice, buffer, 5, &actualLength);
snprintf(str, sizeof(str) / sizeof(str[0]), "%d - %x %x %x %x %x", actualLength, buffer[0], buffer[1], buffer[2], buffer[3], buffer[4]);
IODevice_write(loggerDevice, str, strlen(str));
}
}
}