From eb451d6153436013e7d1a5d246ab9fd3e0d4fe9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sun, 5 Nov 2017 19:12:37 +0100 Subject: [PATCH] Set UsbResponse_InvalidCommand upon encountering with an invalid USB command. --- right/src/usb_protocol_handler.c | 1 + right/src/usb_protocol_handler.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/right/src/usb_protocol_handler.c b/right/src/usb_protocol_handler.c index 44c1152..bf8ab92 100644 --- a/right/src/usb_protocol_handler.c +++ b/right/src/usb_protocol_handler.c @@ -79,6 +79,7 @@ void UsbProtocolHandler(void) UsbCommand_SendKbootCommand(); break; default: + SetUsbError(UsbResponse_InvalidCommand); break; } } diff --git a/right/src/usb_protocol_handler.h b/right/src/usb_protocol_handler.h index c119417..9159a8d 100644 --- a/right/src/usb_protocol_handler.h +++ b/right/src/usb_protocol_handler.h @@ -27,8 +27,8 @@ } usb_command_id_t; typedef enum { - UsbResponse_Success = 0, - UsbResponse_GenericError = 1, + UsbResponse_Success = 0, + UsbResponse_InvalidCommand = 1, } usb_response_t; typedef enum {