[ECOS] cyg_io_read

amassa@cts.com amassa@cts.com
Mon Jul 24 10:22:00 GMT 2000


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


More information about the Ecos-discuss mailing list