From b348846482a17be4f35b717bc56940c84a671e79 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sun, 16 Apr 2017 13:07:55 +0100 Subject: usb: decrease interval, clean-up hid reports --- usb/descriptors.h | 2 +- usb/endpt1.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'usb') 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; -- cgit v1.2.3-54-g00ecf