Closed kvnallsn closed 11 years ago
Looks good to me.
Strangely, XINU keeps track of the number of free bytes in the buffer (uartptr->ocount) and the number of used bytes in the buffer (uartptr->osema) independently. Your change keeps these in sync.
Did you know that signaln() calls the scheduler? Every time you press a key or call putc(), the scheduler runs!
Off to @rememberthe8bit for a final look-through, since this is his component.
It looked fine to me. I copied the MIPS's UART code and replaced only the platform-specific parts, so I'm no expert. @caltry very strange behavior. I'm surprised the original routine worked...
The driver for the pl011 uart was never signaling the output semaphore(uartprt->osema) which cause the threads to eventually lock up and stopping outputing/recieving any data. Adding in the signaln calls seems to have fixed this