From 1566e7012f6b9b69b2a36808caca001d34bd536e Mon Sep 17 00:00:00 2001 From: Amir Hammad Date: Wed, 29 Jul 2015 18:18:44 +0200 Subject: 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 --- src/usbh_driver_hub_private.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/usbh_driver_hub_private.h') 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; -- cgit