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]

RE: Serial Application


Ok

Below is the code, those statements mark with an "*" did execute
When I call printf or cyg_io_write to /dev/haldiag, I see the messages on
COM1 on the hyperterminal, which is connected to serial port 0 on my target.
COM2 is connected to second serial port on my target.

I have tried to look up both ser0 and ser1, both returned with no error.
When I do a cyg_io_write to them nothing get displayed on the hyperterminal.

*   err = cyg_io_lookup( "/dev/haldiag", &handle );

   if (ENOERR == err) {
*        printf("Found /dev/haldiag. Writing string....\n");
*        err = cyg_io_write( handle, test_string, &len );
    }
        
    if (ENOERR == err) {
*        printf("I think I wrote the string. Did you see it?\n");
    }

*    err = cyg_io_lookup( "/dev/ser1", &serial );

    if (ENOERR == err) {
*        printf("Found /dev/ser1. Writing string....\n");

	   >>Not this statement, nothing is receive through serial_1
         err = cyg_io_write( serial, test_string, &len );
    }

    if (ENOERR == err) {
*        printf("I think I wrote the string to serial 1. Did you see
it?\n");
    }

Thanks
Stanley

-----Original Message-----
From: Jonathan Larmour [mailto:jlarmour@redhat.com]
Sent: Friday, April 27, 2001 02:14
To: Ho Shui Choy Stanley PS03B NCS
Cc: Ecos-Discuss (E-mail)
Subject: Re: [ECOS] Serial Application


Ho Shui Choy Stanley PS03B NCS wrote:
> 
> The flow control was disabled.
> 
> I receive the printf statements on /dev/haldiag. When I do a lookup on
ser0
> or ser1 there is no error. Even if /dev/haldiag is tied to ser0 or ser1, I
> should have got the message on that port but nothing is coming out.

I'm still not clear on exactly what you do see. Does /dev/haldiag itself
work? Does the initial cyg_io_write work?

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


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