Errors in netos_serl.c (UART)

There are some errors in the file netos_serl.c (UART) 1. onccIntRd() and onccIntWr() If you want to clear a bit in the status register you have to write a 1 to this bit position. The following statement will clear ALL bits in the status register! SER_REG (pChan->serChannel, STAT_REG) |= XMITR_RDY_IRQ; change it to: SER_REG (pChan->serChannel, STAT_REG) = XMITR_RDY_IRQ; This bug occurs several times, which means you clear receiver bits in the transmitter and vice versa. 2. onccIntRd() /* We have buffer space for receiving / reg = (SER_REG(pChan->serChannel, STAT_REG)); if ((!(reg & RECV_RDY)) && ((reg & RECV_HALF_FULL)|(reg & RECV_CLOSED))) { SER_REG(pChan->serChannel, STAT_REG) |= RECV_CLOSED; / per Jim Duda… J.W. */ #ifdef DEBUG_SERIAL rbcc++; #endif reg = (SER_REG(pChan->serChannel, STAT_REG)); } What happens if a character is received after the first statement, i.e. we have already read the status? Is this status maybe changing to RRDY? Do we close the newly opened buffer and loose a character? Waster, what is the solution to this problem? 3. Xon / Xoff pChan->flow_controled is used for input AND output channel! One bit for two channels? How can this work?