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]

Serial Console application - iq80310


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
 


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