mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 21:03:59 +02:00
use 64byte for messages
This commit is contained in:
parent
5089785e4a
commit
f482e0618f
3 changed files with 9 additions and 5 deletions
|
@ -35,15 +35,17 @@ ROM ** rom = (ROM **)0x1fff1ff8;
|
||||||
|
|
||||||
/* --------------------------------------------------- */
|
/* --------------------------------------------------- */
|
||||||
|
|
||||||
#define INSIZE 8
|
#define INSIZE 64
|
||||||
#define OUTSIZE 2
|
#define OUTSIZE 2
|
||||||
|
|
||||||
void GetInReport (uint8_t src[], uint32_t length)
|
void GetInReport (uint8_t src[], uint32_t length)
|
||||||
{
|
{
|
||||||
|
static int j = 0;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < INSIZE; ++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)
|
void SetOutReport (uint8_t dst[], uint32_t length)
|
||||||
|
|
|
@ -30,7 +30,7 @@ static const int PRODUCT_ID = 0x0003;
|
||||||
|
|
||||||
// Values for bmRequestType in the Setup transaction's Data packet.
|
// 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 OUTSIZE = 2;
|
||||||
static const int INTERFACE_NUMBER = 0;
|
static const int INTERFACE_NUMBER = 0;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
import usb
|
import usb
|
||||||
|
import time
|
||||||
|
|
||||||
usbdev = usb.core.find(idVendor=0x1fc9, idProduct=0x0003)
|
usbdev = usb.core.find(idVendor=0x1fc9, idProduct=0x0003)
|
||||||
|
|
||||||
|
@ -16,5 +17,6 @@ epi = usb.util.find_descriptor(
|
||||||
custom_match = lambda e: \
|
custom_match = lambda e: \
|
||||||
usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN)
|
usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN)
|
||||||
|
|
||||||
print epo.write('@A')
|
for i in xrange(1024):
|
||||||
print epi.read(8)
|
epo.write('@A')
|
||||||
|
epi.read(64)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue