This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
/dev/??? for assabet
- From: Andrew Xiang <ahgu at yahoo dot com>
- To: ecos-discuss at sourceware dot cygnus dot com
- Date: Fri, 16 Nov 2001 21:37:41 -0500
- Subject: [ECOS] /dev/??? for assabet
- Organization: Andrew Xiang
- Reply-to: ahgu at yahoo dot com
I try to dump the debug msgs(printf) to the serial port, just follow
redboot.
But how do I figure out the name? I tried /dev/tty0,1 also ser0,1,
all with no luck.
#include <cyg/io/io.h>
#include <cyg/io/serialio.h>
#include <cyg/error/codes.h>
#include <stdio.h>
int main(void)
{
cyg_uint32 length;
Cyg_ErrNo error;
char test_msg1[]="This is a test message!\n";
cyg_io_handle_t serial_port_handle;
error = cyg_io_lookup("/dev/tty1", &serial_port_handle);
if (error == ENOERR) {
length = strlen(&test_msg1[0]);
cyg_io_write(serial_port_handle, &test_msg1[0], &length);
}
printf("andrew xiang!\n");
return 0;
}