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]
Other format: [Raw text]

Problems with cyg_io_read


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


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