[ECOS] Problems with cyg_io_read

Amanda Heyward amanda_heyward@yahoo.com
Thu Aug 19 15:51:00 GMT 2004


Hi,
    I have written a small application for the EB40A
board. It uses cyg_io_read to read bytes sent from a
PC. Since I don't know how many bytes the PC would be
sending, I would read the first byte (which is the
length field), and read the rest accordingly.
The problem is that if the number of bytes sent are
more than 15, then the second read function fails to
read everything. It reads a few and skips to the last
byte. the number of bytes that are read are lower than
what I have specified. I'm also using the read
functions in blocking mode.
Also, in general, if I try to read one byte at a time
in a for loop, then again read fails for transmissions
greater than  15. But if I do one single read on
whatever number of bytes, then its ok.

Can someone please help me on this.

Thanks.

Amanda.


		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list