UART driver: read function

Joel Sherrill joel.sherrill at oarcorp.com
Fri Mar 20 15:10:08 UTC 2015



On 3/20/2015 9:59 AM, Daniel Krüger wrote:
> Beside some problems/differences between newlibc and glibc, one 
> RTEMS-specific questions remains unanswered:
>
> What is the right implementation for the UART driver read function 
> (console_fns.deviceRead)? It seems to be implemented differently from 
> target to target. Some implementations return -1 if the receive FIFO is 
> empty and some implementations do a busy waiting for new characters.
It should be -1. That works with polled IO support from termios.

But interrupt driven drivers would not have a read method. The RX ISR
puts the data directly into termios buffers (e.g. rtems_termios_enqueue...)

What code polls forever?
> Best regards,
>    Daniel Krüger
>

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the devel mailing list