[PATCH] or1ksim: Console: implement uart_read_polled

Joel Sherrill joel.sherrill at oarcorp.com
Mon Sep 29 20:02:25 UTC 2014


On 9/29/2014 2:53 PM, Hesham Moustafa wrote:
> Thanks for committing. 
>
> There are some other few pending patches. This one [1] adds
> qemu-system-or32 script to sim-scripts, and this [2] adds a new RTEMS
> tester script to test or1ksim BSP running on qemu.
>
> [1] http://lists.rtems.org/pipermail/devel/2014-September/008064.html
This is now committed.
> [2] http://lists.rtems.org/pipermail/devel/2014-September/008047.html
>
As is this.

Anything else missing?

--joel

> On Mon, Sep 29, 2014 at 9:38 PM, Joel Sherrill
> <joel.sherrill at oarcorp.com <mailto:joel.sherrill at oarcorp.com>> wrote:
>
>     Sorry. This is now committed.
>
>     Anything else besides the task stack initialization patch?
>
>     --joel
>
>     On 9/29/2014 12:57 AM, Hesham Moustafa wrote:
>>     Hi,
>>
>>     This patch is needed for capture, pppd and any other tests that
>>     prompt users to input data interactively. 
>>
>>     Regards,
>>     Hesham
>>
>>     On Fri, Sep 19, 2014 at 9:20 PM, Hesham ALMatary
>>     <heshamelmatary at gmail.com <mailto:heshamelmatary at gmail.com>> wrote:
>>
>>         Implement uart_read_polled which is needed for any
>>         application that
>>         reads input from users. It works fine with pppd, capture, and all
>>         termios tests.
>>         ---
>>          c/src/lib/libbsp/or1k/or1ksim/console/uart.c | 13 +++++++++++--
>>          1 file changed, 11 insertions(+), 2 deletions(-)
>>
>>         diff --git a/c/src/lib/libbsp/or1k/or1ksim/console/uart.c
>>         b/c/src/lib/libbsp/or1k/or1ksim/console/uart.c
>>         index f1cfa09..c0ee618 100644
>>         --- a/c/src/lib/libbsp/or1k/or1ksim/console/uart.c
>>         +++ b/c/src/lib/libbsp/or1k/or1ksim/console/uart.c
>>         @@ -86,9 +86,18 @@ static int uart_last_close(int major, int
>>         minor, void *arg)
>>            return 0;
>>          }
>>
>>         -static int uart_read_polled(int minor)
>>         +static char uart_read_polled(int minor)
>>          {
>>         -   return -1;
>>         +  unsigned char lsr;
>>         +  char c;
>>         +
>>         + /* Get a character when avaiable */
>>         +  do {
>>         +       lsr = OR1KSIM_REG(OR1KSIM_BSP_UART_REG_LINE_STATUS);
>>         +  } while ((lsr & OR1KSIM_BSP_UART_REG_LINE_STATUS_DR)
>>         +           != OR1KSIM_BSP_UART_REG_LINE_STATUS_DR);
>>         +
>>         +  return OR1KSIM_REG(OR1KSIM_BSP_UART_REG_RX);
>>          }
>>
>>          static void uart_write_polled(int minor, char c)
>>         --
>>         1.9.3
>>
>>
>
>     -- 
>     Joel Sherrill, Ph.D.             Director of Research & Development
>     joel.sherrill at OARcorp.com <mailto:joel.sherrill at OARcorp.com>        On-Line Applications Research
>     Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>     Support Available                (256) 722-9985
>
>

-- 
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20140929/841f088c/attachment-0002.html>


More information about the devel mailing list