1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 08:21:18 +01:00

Merge pull request #9542 from yegorich/pr/tests/uart_periph/autotester-v2

tests/periph_uart: adapt main.c for automated testing
This commit is contained in:
Peter Kietzmann 2018-07-11 10:20:25 +02:00 committed by GitHub
commit 68f1bae775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,11 +91,11 @@ static void *printer(void *arg)
uart_t dev = (uart_t)msg.content.value;
char c;
printf("UART_DEV(%i) RX: ", dev);
printf("Success: UART_DEV(%i) RX: [", dev);
do {
c = (int)ringbuffer_get_one(&(ctx[dev].rx_buf));
if (c == '\n') {
puts("\\n");
puts("]\\n");
}
else if (c >= ' ' && c <= '~') {
printf("%c", c);
@ -145,7 +145,7 @@ static int cmd_init(int argc, char **argv)
puts("Error: Unable to initialize UART device\n");
return 1;
}
printf("Successfully initialized UART_DEV(%i)\n", dev);
printf("Success: Successfully initialized UART_DEV(%i)\n", dev);
/* also test if poweron() and poweroff() work (or at least don't break
* anything) */