Added yield to lower CPU usage when no characters are arriving.

This commit is contained in:
skarg
2011-05-10 22:00:32 +00:00
parent e85ab0b49f
commit b863996349
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ void RS485_Check_UART_Data(volatile struct mstp_port_struct_t *mstp_port)
if (mstp_port->DataAvailable == false) {
/* check for data */
pthread_mutex_lock(&Reader_Mutex);
if (FIFO_Count(&Rx_FIFO) > 0) {
if (FIFO_Count(&Rx_FIFO) > 0) {
mstp_port->DataRegister = FIFO_Get(&Rx_FIFO);
mstp_port->DataAvailable = true;
}