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


Hi

I have modified the serial.c in the \ecos\examples. I use it to test the
serial read/write for the EB40. Part of the code is shown below:

cyg_io_handle_t handle;
    Cyg_ErrNo err;
    const char test_string[] = "serial example is working correctly!\n";
    cyg_uint32 len = strlen(test_string);
	unsigned char buffer[16];
	int len1;

    printf("Starting serial example\n");

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

    if (ENOERR == err) {
        printf("Found /dev/haldiag. Writing string....\n");
		err = cyg_io_read(handle, &buffer[0], &len1);
        err = cyg_io_write( handle, test_string, &len );
    }

I used insight to debug and I found that the function "cyg_io_write" will
call the device driver function "at91eb40_serial_putc" but the
"cyg_io_read" had not call the "at91eb40_serial_getc". Why?

Also, there are some testing programs in the io\serial but some of the
programs need ser_filter to run.  Where can I find it?

Does eCos have any testing programs that are used to test the serial device
driver[read/wirte]? [the testing program will not share the serial port
with GDB]

Thanks! :D
----------------------------------------------------
Chris

_________________________________________________________________________
Sure, you can have free email. But free Email, Voicemail and Faxmail?
Check it out at http://www.2bzd.com


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