summaryrefslogtreecommitdiff
path: root/src/usbh_driver_hid.c
diff options
context:
space:
mode:
authorAmir Hammad <amir.hammad@hotmail.com>2016-09-11 12:03:20 +0200
committerAmir Hammad <amir.hammad@hotmail.com>2016-09-11 13:31:48 +0200
commit4415d960c3d1e52573db02be4aee6e22d22809cf (patch)
tree5fb726233f1067a6c4866f00a651405921ee029f /src/usbh_driver_hid.c
parentbacf8ecdbb65774f04fce6ec6cd373a2651ddd67 (diff)
downloadsecure-hid-4415d960c3d1e52573db02be4aee6e22d22809cf.tar.gz
secure-hid-4415d960c3d1e52573db02be4aee6e22d22809cf.tar.bz2
secure-hid-4415d960c3d1e52573db02be4aee6e22d22809cf.zip
use default case instead of handling other packet statuses explicitely
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
Diffstat (limited to 'src/usbh_driver_hid.c')
-rw-r--r--src/usbh_driver_hid.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/usbh_driver_hid.c b/src/usbh_driver_hid.c
index 15af80b..bb842db 100644
--- a/src/usbh_driver_hid.c
+++ b/src/usbh_driver_hid.c
@@ -231,8 +231,7 @@ static void event(usbh_device_t *dev, usbh_packet_callback_data_t cb_data)
hid->state_next = STATE_READING_REQUEST;
break;
- case USBH_PACKET_CALLBACK_STATUS_EFATAL:
- case USBH_PACKET_CALLBACK_STATUS_EAGAIN:
+ default:
ERROR(cb_data.status);
hid->state_next = STATE_INACTIVE;
break;
@@ -251,9 +250,7 @@ static void event(usbh_device_t *dev, usbh_packet_callback_data_t cb_data)
parse_report_descriptor(hid, hid->buffer, cb_data.transferred_length);
break;
- case USBH_PACKET_CALLBACK_STATUS_ERRSIZ:
- case USBH_PACKET_CALLBACK_STATUS_EFATAL:
- case USBH_PACKET_CALLBACK_STATUS_EAGAIN:
+ default:
ERROR(cb_data.status);
hid->state_next = STATE_INACTIVE;
break;