--- a/LPCBus/MC9_Devices_decl.c Tue Dec 13 10:29:07 2016 +0100
+++ b/LPCBus/MC9_Devices_decl.c Fri Jan 13 15:22:25 2017 +0100
@@ -460,14 +460,13 @@
- while(count < uartBufSize){
+ FD_ZERO(&set); /* clear the set */ + FD_SET(UART_fd, &set); /* add our file descriptor to the set */ - FD_ZERO(&set); /* clear the set */
- FD_SET(UART_fd, &set); /* add our file descriptor to the set */
- timeout.tv_usec = 50000;
+ timeout.tv_usec = 20000; + while(count < uartBufSize){ rv = select(UART_fd + 1, &set, NULL, NULL, &timeout);
printf("RS485 select error\n");