use 64byte for messages

This commit is contained in:
Pavol Rusnak 2011-04-05 00:19:03 +02:00
parent 5089785e4a
commit f482e0618f
3 changed files with 9 additions and 5 deletions

View file

@ -35,15 +35,17 @@ ROM ** rom = (ROM **)0x1fff1ff8;
/* --------------------------------------------------- */
#define INSIZE 8
#define INSIZE 64
#define OUTSIZE 2
void GetInReport (uint8_t src[], uint32_t length)
{
static int j = 0;
int i;
for (i = 0; i < INSIZE; ++i) {
src[i] = 'A' + i;
src[i] = 'A' + i + j;
}
if (++j>32) j = 0;
}
void SetOutReport (uint8_t dst[], uint32_t length)

View file

@ -30,7 +30,7 @@ static const int PRODUCT_ID = 0x0003;
// Values for bmRequestType in the Setup transaction's Data packet.
static const int INSIZE = 8;
static const int INSIZE = 64;
static const int OUTSIZE = 2;
static const int INTERFACE_NUMBER = 0;

View file

@ -1,6 +1,7 @@
#!/usr/bin/python
import usb
import time
usbdev = usb.core.find(idVendor=0x1fc9, idProduct=0x0003)
@ -16,5 +17,6 @@ epi = usb.util.find_descriptor(
custom_match = lambda e: \
usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN)
print epo.write('@A')
print epi.read(8)
for i in xrange(1024):
epo.write('@A')
epi.read(64)