This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Serial Console application - iq80310
- To: <ecos-discuss at sources dot redhat dot com>
- Subject: [ECOS] Serial Console application - iq80310
- From: "Shlomi" <shlomi at omegaband dot co dot il>
- Date: Sun, 21 Oct 2001 20:18:13 +0200
I try to develop a serial console application for the iq80310.
I use dev/ttydiag.
Output to the console is fine but input from the console does not work
properly.
If interrupts are disabled while performing cyg_io_read then it works
fine.
But if the interrupts are enabled it does not work. Input is not read,
and one in about 10 to 20 keystrokes an unexpected input is character is
obtained.
Here is the relevant code.
error = cyg_io_lookup("/dev/ttydiag",&DiagHandle);
if (error == -ENOENT)
diag_printf("error opening console");
else
diag_printf("opening console");
length =20;
cyg_io_write(DiagHandle,"\nlogin:",&length);
length =1;
cyg_thread_delay(10);
cyg_io_read(DiagHandle,line,&length);
cyg_thread_delay(10);
Does anybody have a working interactive serial console application?
Shlomi