This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: A problem in scnaf() function: Help needed
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: "Ram Khatkhedkar (enSys)" <gccram at yahoo dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 04 Apr 2002 03:34:31 +0100
- Subject: [ECOS] Re: A problem in scnaf() function: Help needed
- References: <000e01c1ca5c$b83668a0$0264a8c0@server>
> "Ram Khatkhedkar (enSys)" wrote:
>
> In function
> hal_if_diag_read_char()
> {
> :
> :
> if(__chan)
> {
> CYGACC_COMM_IF_GETC(* __chan);
> }
> :
> :
> }
> where __chan is a pointer of type hal_virtual_comm_table_t (it is an aray
> of unsigned integers)
> The if(__chan) condition gets satisfies and the program gets hanged.
> Can you suggest me why is it happeening like this?? What shall I do to
> overcome this difficulty?? How shall I run the scanf() in my
> application??
Assuming you are using the default configuration, this will call into
RedBoot to get the character. But be warned - if you are debugging via GDB
then it can't work as there is no way to get character input from GDB to
the target - GDB doesn't support it.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss