summaryrefslogtreecommitdiff
path: root/src/usbh_driver_hub_private.h
diff options
context:
space:
mode:
authorAmir Hammad <amir.hammad@hotmail.com>2015-07-29 18:18:44 +0200
committerAmir Hammad <amir.hammad@hotmail.com>2015-07-29 18:18:44 +0200
commit1566e7012f6b9b69b2a36808caca001d34bd536e (patch)
tree636d79c2e6c63a4fe84839512db5f1dc98670555 /src/usbh_driver_hub_private.h
parent09c861c97572de2302e294ae908225e89237c7ad (diff)
downloadsecure-hid-1566e7012f6b9b69b2a36808caca001d34bd536e.tar.gz
secure-hid-1566e7012f6b9b69b2a36808caca001d34bd536e.tar.bz2
secure-hid-1566e7012f6b9b69b2a36808caca001d34bd536e.zip
hub: Empty packet readings after SET_ and CLEAR_ commands
* fixed typo/bug: "hub->state += 2" must have been "hub->state = 2" to issue empty read Now, after each SET_ or CLEAR_ command, empty read is issued. + removed forward declaration of event() - cleaning Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
Diffstat (limited to 'src/usbh_driver_hub_private.h')
-rw-r--r--src/usbh_driver_hub_private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/usbh_driver_hub_private.h b/src/usbh_driver_hub_private.h
index 4b98880..df38243 100644
--- a/src/usbh_driver_hub_private.h
+++ b/src/usbh_driver_hub_private.h
@@ -61,6 +61,8 @@
#define CURRENT_PORT_NONE -1
+#define EMPTY_PACKET_READ_STATE 255
+
struct _hub_device {
usbh_device_t *device[USBH_HUB_MAX_DEVICES + 1];
uint8_t buffer[USBH_HUB_BUFFER_SIZE];
@@ -68,6 +70,8 @@ struct _hub_device {
uint8_t endpoint_in_address;
uint8_t endpoint_in_toggle;
uint8_t state;
+ uint8_t state_after_empty_read;
+
uint8_t desc_len;
uint16_t ports_num;
int8_t index;