diff --git a/quad/src/virt_quad/hw_impl_unix_uart.c b/quad/src/virt_quad/hw_impl_unix_uart.c index 9d1001ee2fd413626f374aa20ad612364f572891..27bdfcb8d2c0271ea8a9f4d0c22e131519e866ef 100644 --- a/quad/src/virt_quad/hw_impl_unix_uart.c +++ b/quad/src/virt_quad/hw_impl_unix_uart.c @@ -41,17 +41,18 @@ int unix_uart_reset(struct UARTDriver *self) { err(-1, "listen"); } + printf("Waiting for backend to connect\n"); + while (1) { client = accept(backendSocket, NULL, NULL); if (client > 0) break; } - printf(" accpet() returned with %d\n", client); + printf("backend connection found on socket %d.\n", client); return 0; } int unix_uart_write(struct UARTDriver *self, unsigned char c) { - printf("sending [%c]\n", c); send(client, &c, 1, MSG_DONTWAIT); return 0; } @@ -62,10 +63,8 @@ int unix_uart_read(struct UARTDriver *self, unsigned char *c) { if (bytes_available > 0) { int bytes = recv(client, c, 1, 0); - printf("read in %d byte [%X]\n", bytes, *c); return 0; } else { return 1; } - } \ No newline at end of file