summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmir Hammad <amir.hammad@hotmail.com>2015-04-05 11:52:38 +0200
committerAmir Hammad <amir.hammad@hotmail.com>2015-04-05 11:52:38 +0200
commit0da537ec692ae3fa79a9ca61a8b3f3e9fe059021 (patch)
treef6697a679a0728ffe05bf8a21cd692226e220539 /src
parentae3449a302ba199f24810f1f8e9352cf121d2183 (diff)
downloadsecure-hid-0da537ec692ae3fa79a9ca61a8b3f3e9fe059021.tar.gz
secure-hid-0da537ec692ae3fa79a9ca61a8b3f3e9fe059021.tar.bz2
secure-hid-0da537ec692ae3fa79a9ca61a8b3f3e9fe059021.zip
Device driver/hid_mouse: Bugfix enum STATES
fixing after enum STATES refactor. Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/usbh_driver_hid_mouse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usbh_driver_hid_mouse.c b/src/usbh_driver_hid_mouse.c
index 6391ed7..1797cd7 100644
--- a/src/usbh_driver_hid_mouse.c
+++ b/src/usbh_driver_hid_mouse.c
@@ -187,7 +187,7 @@ static void event(usbh_device_t *dev, usbh_packet_callback_data_t cb_data)
LOG_PRINTF("|empty packet read|");
switch (cb_data.status) {
case USBH_PACKET_CALLBACK_STATUS_OK:
- mouse->state_next++;
+ mouse->state_next = STATE_SET_CONFIGURATION_COMPLETE;
device_xfer_control_read(0, 0, event, dev);
break;
@@ -274,7 +274,7 @@ static void mouse_poll(void *drvdata, uint32_t time_curr_us)
setup_data.wIndex = 0;
setup_data.wLength = 0;
- mouse->state_next++;
+ mouse->state_next = STATE_SET_CONFIGURATION_EMPTY_READ;
device_xfer_control_write(&setup_data, sizeof(setup_data), event, dev);
}