You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the LibUsb.c bulkTransfer(...) function is not implemented correctly.
It is using a ByteBuffer to receive the data to be transmitted. But it is not evaluating/updating the position/limit fields.
It only retrieves the array pointer and uses the capacity.
That forces the callee code to allocate the ByteBuffer for each call. It could have better performance if the starting to read at position, updates the read amount of bytes by increasing the position and take the limit into account (instead of the capacity).
This would make the "transferred" parameter no more needed.
Frank
The text was updated successfully, but these errors were encountered:
Hi,
I think the LibUsb.c bulkTransfer(...) function is not implemented correctly.
It is using a ByteBuffer to receive the data to be transmitted. But it is not evaluating/updating the position/limit fields.
It only retrieves the array pointer and uses the capacity.
That forces the callee code to allocate the ByteBuffer for each call. It could have better performance if the starting to read at position, updates the read amount of bytes by increasing the position and take the limit into account (instead of the capacity).
This would make the "transferred" parameter no more needed.
Frank
The text was updated successfully, but these errors were encountered: