[ECOS] Select() issues

Andrew Lunn andrew@lunn.ch
Thu Jan 11 18:20:00 GMT 2007


> Up until this particular issue I have had no problems using "standard in".
> I will look to see what effect opening /dev/termios0, but most examples
> I have seen use STDIN_FILENO directly.

Please could you point me at the eCos examples that do this?

> Changing my code slightly, I now find that I now block at cin.get().
> I wondering whether I am doing something wrong when changing to canocial
> mode?
> 
> char InputHandler::DoPressAnyKey()
> {
>     struct termios  ts, ots;
>     int             c  = 0;
>     int             fd = STDIN_FILENO;  
>                   
>     cout << "--0\n";
>           
>     tcflush(fd,TCIOFLUSH);    
>        
>     cout << "--1\n";  

You are using stdout, not the file descriptor for a /dev/termios0.  I
would first determine is you are using the correct file
descriptor. When this really is wrong, nothing will work......

            Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list