- structural changes (Device as instance)

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@100 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
schlaepfer
2006-02-17 17:04:04 +00:00
parent 718f9fb4c5
commit 27bfb3683f
8 changed files with 234 additions and 104 deletions

View File

@@ -82,11 +82,11 @@ public class TestImplementation {
}
static void read() {
byte[] data = new byte[USB.MAX_DATA_SIZE];
byte[] data = new byte[dev.getMaxPacketSize()];
int lenRead = 0;
try {
lenRead = dev.bulkread(IN_ENDPOINT, data,
USB.MAX_DATA_SIZE, TIMEOUT);
lenRead = dev.bulkread(IN_ENDPOINT, data, dev.getMaxPacketSize(),
TIMEOUT);
StringBuffer sb = new StringBuffer("read_bulkdata: " + lenRead
+ " Bytes received: Data: ");
for (int i = 0; i < lenRead; i++) {