summaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2017-04-16 13:07:55 +0100
committerTomasz Kramkowski <tk@the-tk.com>2017-04-16 13:07:55 +0100
commitb348846482a17be4f35b717bc56940c84a671e79 (patch)
tree82b2272be7ba19d794668c645b708cf3732d4344 /usb
parentc996951703f0062ef81e278936f0cf8d0581a200 (diff)
downloadfmk-b348846482a17be4f35b717bc56940c84a671e79.tar.gz
fmk-b348846482a17be4f35b717bc56940c84a671e79.tar.xz
fmk-b348846482a17be4f35b717bc56940c84a671e79.zip
usb: decrease interval, clean-up hid reports
Diffstat (limited to 'usb')
-rw-r--r--usb/descriptors.h2
-rw-r--r--usb/endpt1.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/usb/descriptors.h b/usb/descriptors.h
index a2b56f8..6ebfded 100644
--- a/usb/descriptors.h
+++ b/usb/descriptors.h
@@ -68,7 +68,7 @@ unsigned char ds_conf[] = {
0x81, // Endpoint address (D000NNNN, D - Direction (0 OUT, 1 IN), N - Endpoint No.)
0x03, // Attributes (00UUSSTT, U - Usage type, S - Synch type, T - Transfer type)
U16LE(64), // Max packet size
- 64, // Interval (1ms Frames)
+ 1, // Interval (1ms Frames)
};
_Static_assert(sizeof ds_conf == DS_CONF_SIZE, "sizeof ds_conf != DS_CONF_SIZE");
diff --git a/usb/endpt1.c b/usb/endpt1.c
index 4358221..65684b5 100644
--- a/usb/endpt1.c
+++ b/usb/endpt1.c
@@ -10,10 +10,10 @@
#define MAX_PACKET 64
static unsigned char report[4][4] = {
- { 0x00, 0x01, 0x00, 0x00, },
- { 0x00, 0x00, 0x01, 0x00, },
- { 0x00, 0xff, 0x00, 0x00, },
- { 0x00, 0x00, 0xff, 0x00, },
+ { 0x00, 5, 0, 0x00, },
+ { 0x00, 0, 5, 0x00, },
+ { 0x00, -5, 0, 0x00, },
+ { 0x00, 0, -5, 0x00, },
};
static int nextrep;