I am currently experiencing problems when using UsbRequest.queue(ByteBuffer, int).
It seems to ignore the position of the ByteBuffer and always starts writing at position 0 in the buffer. It then sets the position of the buffer to the bytes read?
How can that be, that this is just ignored? Any ideas on how to specify the start position in the ByteBuffer?
Thanks, Magnus
EDIT2: So what I am basically now doing is using a temporary buffer and then copy the data accordingly to the final buffer.
EDIT: This is not a solution! wrap just sets the position of the ByteBuffer to offset.
Okay I found a workaround using ByteBuffer#wrap(byte[] array, int offset, int length)