Endpoint_Read_Stream_LE question

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by mozmck on Fri Feb 17 16:02:45 MST 2012
I'm having problems understanding the Endpoint_Read_Stream_LE() function.  The documentation in EndpointStream_LPC.h makes sense, but it does not seem to match the actual function.  The BytesProcessed variable is simply not used in the function in spite of the documentation, and there seem to be no checks that the data being read out of usb_data_buffer in Endpoint_Read_8() is actually data that was received from the host.

How do I know that if I call Endpoint_Read_Stream_LE() to read 128 bytes for instance, that I'm actually reading data sent from the host?  In addition, is there any way to find out how many un-read bytes are in the buffer?

Thanks in advance for any help!