public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] getting a char from the keyboard
@ 2000-11-21 22:52 Narayanan, Anita (CTS)
  2000-11-22  0:52 ` Jesper Skov
  2000-11-22  4:31 ` Nick Garnett
  0 siblings, 2 replies; 4+ messages in thread
From: Narayanan, Anita (CTS) @ 2000-11-21 22:52 UTC (permalink / raw)
  To: ecos-discuss

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!!!!


anita

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] getting a char from the keyboard
  2000-11-21 22:52 [ECOS] getting a char from the keyboard Narayanan, Anita (CTS)
@ 2000-11-22  0:52 ` Jesper Skov
  2000-11-22  4:31 ` Nick Garnett
  1 sibling, 0 replies; 4+ messages in thread
From: Jesper Skov @ 2000-11-22  0:52 UTC (permalink / raw)
  To: Narayanan, Anita (CTS); +Cc: ecos-discuss

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

Narayanan,> Hi everybody, Again making a desperate attempt to get a
Narayanan,> solution for my problem which is "getting a character from
Narayanan,> the keyboard".  I have tried using scanf, fgetc, gets but
Narayanan,> it simply wouldn't work.

Narayanan,> Iam using i386 as my target.

Do you mean the keyboard on the _target_? If so, you need to write a
driver.

If you mean the keyboard on the host, you need a serial connection
separate from that GDB uses, since you cannot send data to the target
on the same line as the one GDB uses.

Those things aside, I'm pretty sure the functions above should work
(i.e., on a dedicated serial line with a terminal emulator at the host
end).

Jesper


Please get rid of this part, it's not only annoying, it's totally
bogus.

Narayanan,> This e-mail and any files transmitted with it are for the
Narayanan,> sole use of the intended recipient(s) and may contain
Narayanan,> confidential and privileged information.  If you are not
Narayanan,> the intended recipient, please contact the sender by reply
Narayanan,> e-mail and destroy all copies of the original message. Any
Narayanan,> unauthorised review, use, disclosure, dissemination,
Narayanan,> forwarding, printing or copying of this email or any
Narayanan,> action taken in reliance on this e-mail is strictly
Narayanan,> prohibited and may be unlawful.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] getting a char from the keyboard
  2000-11-21 22:52 [ECOS] getting a char from the keyboard Narayanan, Anita (CTS)
  2000-11-22  0:52 ` Jesper Skov
@ 2000-11-22  4:31 ` Nick Garnett
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2000-11-22  4:31 UTC (permalink / raw)
  To: ecos-discuss

"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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] getting a char from the keyboard
@ 2000-11-23  4:10 Narayanan, Anita (CTS)
  0 siblings, 0 replies; 4+ messages in thread
From: Narayanan, Anita (CTS) @ 2000-11-23  4:10 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-11-23  4:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-21 22:52 [ECOS] getting a char from the keyboard Narayanan, Anita (CTS)
2000-11-22  0:52 ` Jesper Skov
2000-11-22  4:31 ` Nick Garnett
2000-11-23  4:10 Narayanan, Anita (CTS)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).