BulkIn.XferData(ref indata, ref l)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi, 

   

A question about BulkRead.

   

The data length i am reading from USB device is not constant (for each individual trial). However, XferData( ) requires to specify data length before reading action. Is there anyway to know the data length in advance? Or, how to read out all data while do not know data length?

   

Thanks.

0 Likes
1 Reply
Anonymous
Not applicable

The Xfer can be terminated with a ZLP. you can program your device to send a Zero length packet at the end of the transfer indicating that the transfer is over.  Xfer can also be terminated if the data from the device is less than the max packet size,

0 Likes