This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help: How to get Keyboard input in synthetic environmet?


> That's useful, although right now if you want *simple* input and don't 
> mind things like busy waits, you should already be able to use the 
> existing libc functions as-is; because deep down in the HAL there is:
> 
> void hal_diag_read_char(char *c)
> {
>     int rc;
>     do {
>         rc = cyg_hal_sys_read(0, c, 1);
>     } while ((-CYG_HAL_SYS_EINTR == rc) || (-CYG_HAL_SYS_EAGAIN == rc));
> }
> 
> i.e. it does a read() of stdin.

*simple* is important here and probably not want he wants in a
CLI. The unix stdin will still be in cooked mode which may cause
problems. 

          Andrew

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]