fread blocks on device data read?

João Rasta freakforever at gmail.com
Tue Aug 17 15:34:53 UTC 2010


Hi,

I'm trying to read data from UART2 that works in interrupt mode in RTEMS. As
far as i understand, the driver loads the data to a software buffer using
interrupts when the data arrives, so the task of geting the data from the
buffer should be invisible to the user and could be made, for instance,
with:

FILE * A;
    char buff;
    A = fopen(COMMS__DKE_LOOP_DEVICE_NAME,"r+");
    while(1)
    {
        fread(&buff,1,1,A);
        printf("%02X\n",buff);
    }

However this routine is blocking on fread(). Do i need to set any special
settings uppon RTEMS initialization? I'm adding
CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER so the driver is up and running
(tested with stdio UART). What am i missing?


Best,
JM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20100817/dfded0ca/attachment.html>


More information about the users mailing list