This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
cyg_io_read
- To: jlarmour at redhat dot co dot uk
- Subject: [ECOS] cyg_io_read
- From: "amassa at cts dot com" <amassa at cts dot com>
- Date: Mon, 24 Jul 2000 09:41:44 -0700 (PDT)
- Cc: ecos-discuss at sourceware dot cygnus dot com
I am trying to get input from the /dev/tty1 device. I have attached the
code snippet I am using. However, I am unable to get any input from the
serial port. I am running on an MBX board. I can send output to the port
using cyg_io_write for the /dev/tty1 device. The device seems to get
initialized properly from the cyg_io_lookup call - there is no error
returned. I never return from the call to cyg_io_read.
I have also tried this with GDB in the stubs disabled.
Can you give me some suggestions or reasons why this is not working?
CODE...
UCHAR ucCommandBuffer[ MAX_COMMAND_LENGTH ];
cyg_uint32 uiCommandLength;
Cyg_ErrNo erError;
CHAR cCliDeviceName[ ] = "/dev/tty1";
cyg_io_handle_t hCliDevice;
erError = cyg_io_lookup( cCliDeviceName, &hCliDevice );
uiCommandLength = 10;
erError = cyg_io_read( hCliDevice, ucCommandBuffer, uiCommandLength );
Thanks for any help you can give,
Anthony