From 28f98f179a85749be896366dc7a3a04d0f2b3280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Tue, 12 Dec 2017 18:38:01 +0100 Subject: [PATCH] Change the value of UsbCommandId_{GetDeviceState,SetTestLed,GetDebugBuffer,GetAdcValue,SetLedPwmBrightness}. --- right/src/usb_protocol_handler.c | 42 ++++++++++++++++---------------- right/src/usb_protocol_handler.h | 24 +++++++++--------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/right/src/usb_protocol_handler.c b/right/src/usb_protocol_handler.c index ffc7441..c1851fb 100644 --- a/right/src/usb_protocol_handler.c +++ b/right/src/usb_protocol_handler.c @@ -25,23 +25,11 @@ void UsbProtocolHandler(void) case UsbCommandId_Reenumerate: UsbCommand_Reenumerate(); break; - case UsbCommandId_SetTestLed: - UsbCommand_SetTestLed(); + case UsbCommandId_JumpToModuleBootloader: + UsbCommand_JumpToModuleBootloader(); break; - case UsbCommandId_WriteStagingUserConfig: - UsbCommand_WriteConfig(ConfigBufferId_StagingUserConfig); - break; - case UsbCommandId_ApplyConfig: - UsbCommand_ApplyConfig(); - break; - case UsbCommandId_SetLedPwmBrightness: - UsbCommand_SetLedPwmBrightness(); - break; - case UsbCommandId_GetAdcValue: - UsbCommand_GetAdcValue(); - break; - case UsbCommandId_LaunchEepromTransfer: - UsbCommand_LaunchEepromTransfer(); + case UsbCommandId_SendKbootCommandToModule: + UsbCommand_SendKbootCommandToModule(); break; case UsbCommandId_ReadConfig: UsbCommand_ReadConfig(); @@ -49,17 +37,29 @@ void UsbProtocolHandler(void) case UsbCommandId_WriteHardwareConfig: UsbCommand_WriteConfig(ConfigBufferId_HardwareConfig); break; - case UsbCommandId_GetKeyboardState: + case UsbCommandId_WriteStagingUserConfig: + UsbCommand_WriteConfig(ConfigBufferId_StagingUserConfig); + break; + case UsbCommandId_ApplyConfig: + UsbCommand_ApplyConfig(); + break; + case UsbCommandId_LaunchEepromTransfer: + UsbCommand_LaunchEepromTransfer(); + break; + case UsbCommandId_GetDeviceState: UsbCommand_GetKeyboardState(); break; + case UsbCommandId_SetTestLed: + UsbCommand_SetTestLed(); + break; case UsbCommandId_GetDebugBuffer: UsbCommand_GetDebugBuffer(); break; - case UsbCommandId_JumpToModuleBootloader: - UsbCommand_JumpToModuleBootloader(); + case UsbCommandId_GetAdcValue: + UsbCommand_GetAdcValue(); break; - case UsbCommandId_SendKbootCommandToModule: - UsbCommand_SendKbootCommandToModule(); + case UsbCommandId_SetLedPwmBrightness: + UsbCommand_SetLedPwmBrightness(); break; default: SetUsbTxBufferUint8(0, UsbStatusCode_InvalidCommand); diff --git a/right/src/usb_protocol_handler.h b/right/src/usb_protocol_handler.h index 6e5508a..f901f2c 100644 --- a/right/src/usb_protocol_handler.h +++ b/right/src/usb_protocol_handler.h @@ -16,20 +16,20 @@ UsbCommandId_GetProperty = 0x00, UsbCommandId_Reenumerate = 0x01, - UsbCommandId_JumpToModuleBootloader = 0x02, // was 0x12 - UsbCommandId_SendKbootCommandToModule = 0x03, // was 0x13 + UsbCommandId_JumpToModuleBootloader = 0x02, + UsbCommandId_SendKbootCommandToModule = 0x03, - UsbCommandId_ReadConfig = 0x04, // was 0x0d and 0x0f - UsbCommandId_WriteHardwareConfig = 0x05, // was 0x0e - UsbCommandId_WriteStagingUserConfig = 0x06, // was 0x08 - UsbCommandId_ApplyConfig = 0x07, // was 0x09 - UsbCommandId_LaunchEepromTransfer = 0x08, // was 0x0C + UsbCommandId_ReadConfig = 0x04, + UsbCommandId_WriteHardwareConfig = 0x05, + UsbCommandId_WriteStagingUserConfig = 0x06, + UsbCommandId_ApplyConfig = 0x07, + UsbCommandId_LaunchEepromTransfer = 0x08, - UsbCommandId_GetKeyboardState = 0x10, - UsbCommandId_SetTestLed = 0x14, // was 0x02 - UsbCommandId_GetDebugBuffer = 0x11, - UsbCommandId_GetAdcValue = 0x0B, - UsbCommandId_SetLedPwmBrightness = 0x0A, + UsbCommandId_GetDeviceState = 0x09, + UsbCommandId_SetTestLed = 0x0a, + UsbCommandId_GetDebugBuffer = 0x0b, + UsbCommandId_GetAdcValue = 0x0c, + UsbCommandId_SetLedPwmBrightness = 0x0d, } usb_command_id_t; typedef enum {