2013/1/24 Xiaofan Chen <xiaof...@gmail.com>:
>
> But isn't it the same for interrupt transfer or bulk IN transfer in the
> case you do not know the expected data the device will send?
> In that case, you will have to use multiple of the IN endpoint
> max packet size as the read buffer. Right? On the occasion
> that you know exactly how many data to expect, then of course it
> is okay to use the that.
>

AFAIK, if the host request less than a packet size for bulk or
interrupt and the data packed is larger than that, the host will
receive an error. If the host request packet size bytes, but the
device sends, say, 3 bytes, the host will receive the 3 bytes. As
isochronous is a totally different beast, I am not sure.

If you look the code for the Benchmark firmware, you will see that for
OUT bulk and interrupt transfers, the code calls a GetLength function
to know how many bytes it received, but for isochronous transfers, it
always assume it received "packet size" bytes.

-- 
Best Regards,
Wander Lairson Costa

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to