This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: getting a char from the keyboard
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: RE: [ECOS] getting a char from the keyboard
- From: "Narayanan, Anita (CTS)" <Nanita at DBSS dot COM>
- Date: Thu, 23 Nov 2000 05:19:40 -0500
Hi!
Yes! I got it working. Thanks to this mailing list.
I enabled CYGSEM_HAL_I38_PC_DIAG_SCREEN and used the hal_diag_read_char() to
read from the keyboard.
Note: Jesper, I understand that the last part of the mail can be very
irritating. But it gets automatically attached to each and every mail sent
from our server. So i personally can't do anything about it. Sorry about
that..
> -----Original Message-----
> From: Nick Garnett [SMTP:nickg@cygnus.co.uk]
> Sent: Wednesday, November 22, 2000 5:59 PM
> To: ecos-discuss@sourceware.cygnus.com
> Subject: Re: [ECOS] 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
This e-mail and any files transmitted with it are for the sole use
of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message. Any unauthorised review, use, disclosure,
dissemination, forwarding, printing or copying of this email or any action taken in
reliance on this e-mail is strictly prohibited and may be unlawful.
Visit us at http://www.cognizant.com