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]

Re: Clarification


"Veerraju, Yeluduti (CTS)" wrote:
> 
> Hi,
>   I am veerraju,working as software engineer in Teelcom field.
>   What is the system call or API in ecos to get a character from keyboard?
>   I used getchar() function but it is not working.
>   So could any body help in this?

getchar() should work in general. But on some platforms you should set the
device which stdio uses for stdin to a serial driver such as /dev/tty0.
Ensure you enable the serial drivers. The configuration option in stdio is
named CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE

One other case in which it doesn't work is that you can't use it when using
the serial connection to talk to GDB. Mixing serial I/O and the debug
protocol just doesn't work well.

What target is this anyway?

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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