[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ioctl using FIONREAD command
Hi again, since I had no response to the post I did the 14th of the
present month I'm doing this new post. Sorry to be so insistent but I
need some help.
I just would like if someone have ever used the function ioctl as I
stated in my first post ( "ioctl(fildes,FIONREAD,&unread)" ) and
if he/she obtained the expected result in the unread variable. In that
case please tell me how you did it!
In those days I've also tried to find the source of my problem in the
RTEMS source code, but the problem is that I probably have not enought
knwoledge. So there goes an aditional question
In the source file:
<RTEMS_SRC_INSTALLATION>/cpukit/libcsupport/src/termios.c in the
function rtems_termios_ioctl (void *arg)
I found the following lines
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex;
Where tty is a struct rtems_termios_tty and args has been casted to
So the question is that if the operation it does really counts the
unread bits in the serial port? (I wouldn't dare to do this question
if the comment attached to the code wasn't there )
Finally I just will make a brieffing of my general settings:
and tty_drivers load succesfully at the inizialization of the application.
Again, sorry for being so insistant and thanks you for your attention.
Bye, and hope to have any answer this time! ;)