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]

cyg_io_read


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

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