Mixer test: use real defines from IO firmware

We use the real defines now and test them against every mixer on the system. This means we should catch transfer errors now before even hitting master.
This commit is contained in:
Lorenz Meier
2017-01-03 20:32:33 -05:00
committed by Daniel Agar
parent d401252c9e
commit 5247f17576
2 changed files with 100 additions and 14 deletions
+5 -6
View File
@@ -77,16 +77,17 @@ int test_uart_baudchange(int argc, char *argv[])
int ret;
#define UART_BAUDRATE_RUNTIME_CONF
#ifdef UART_BAUDRATE_RUNTIME_CONF
if ((termios_state = tcgetattr(uart2, &uart2_config)) < 0) {
printf("ERROR getting termios config for UART2: %d\n", termios_state);
ret = termios_state;
goto cleanup;
}
memcpy(&uart2_config_original, &uart2_config, sizeof(struct termios));
if ((termios_state = tcgetattr(uart2, &uart2_config)) < 0) {
printf("ERROR getting termios config for UART2: %d\n", termios_state);
ret = termios_state;
goto cleanup;
}
/* Set baud rate */
if (cfsetispeed(&uart2_config, B9600) < 0 || cfsetospeed(&uart2_config, B9600) < 0) {
@@ -108,8 +109,6 @@ int test_uart_baudchange(int argc, char *argv[])
goto cleanup;
}
#endif
uint8_t sample_uart2[] = {'U', 'A', 'R', 'T', '2', ' ', '#', 0, '\n'};
int i, r;