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: getting a char from the keyboard


"Narayanan, Anita (CTS)" <Nanita@DBSS.COM> writes:

> Hi everybody,
> 
> Again making a desperate attempt to get a solution for my problem which is
> "getting a character from the keyboard". 
> I have tried using scanf, fgetc, gets but it simply wouldn't work. 
> 
> Iam using i386 as my target.
> 
> Somebody, please help me out!!!!
> 
> 

eCos support is aimed mainly at embedded applications which do not
have screens or keyboards, so the only mechanism for using the PC
keyboard is in the diagnostic IO code.

If you enable CYGSEM_HAL_I386_PC_DIAG_SCREEN then you can use
hal_diag_read_char() to get characters from the keyboard. You might
even be able to use the "/dev/haldiag" device driver with the C
library primitives, but this has not been tested.

The keyboard input is polled, so you will only get characters when you
are actually waiting for them.

-- 
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK

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