Change the value of UsbCommandId_{GetDeviceState,SetTestLed,GetDebugBuffer,GetAdcValue,SetLedPwmBrightness}.

This commit is contained in:
László Monda
2017-12-12 18:38:01 +01:00
parent 5798f9e4fb
commit 28f98f179a
2 changed files with 33 additions and 33 deletions

View File

@@ -25,23 +25,11 @@ void UsbProtocolHandler(void)
case UsbCommandId_Reenumerate: case UsbCommandId_Reenumerate:
UsbCommand_Reenumerate(); UsbCommand_Reenumerate();
break; break;
case UsbCommandId_SetTestLed: case UsbCommandId_JumpToModuleBootloader:
UsbCommand_SetTestLed(); UsbCommand_JumpToModuleBootloader();
break; break;
case UsbCommandId_WriteStagingUserConfig: case UsbCommandId_SendKbootCommandToModule:
UsbCommand_WriteConfig(ConfigBufferId_StagingUserConfig); UsbCommand_SendKbootCommandToModule();
break;
case UsbCommandId_ApplyConfig:
UsbCommand_ApplyConfig();
break;
case UsbCommandId_SetLedPwmBrightness:
UsbCommand_SetLedPwmBrightness();
break;
case UsbCommandId_GetAdcValue:
UsbCommand_GetAdcValue();
break;
case UsbCommandId_LaunchEepromTransfer:
UsbCommand_LaunchEepromTransfer();
break; break;
case UsbCommandId_ReadConfig: case UsbCommandId_ReadConfig:
UsbCommand_ReadConfig(); UsbCommand_ReadConfig();
@@ -49,17 +37,29 @@ void UsbProtocolHandler(void)
case UsbCommandId_WriteHardwareConfig: case UsbCommandId_WriteHardwareConfig:
UsbCommand_WriteConfig(ConfigBufferId_HardwareConfig); UsbCommand_WriteConfig(ConfigBufferId_HardwareConfig);
break; 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(); UsbCommand_GetKeyboardState();
break; break;
case UsbCommandId_SetTestLed:
UsbCommand_SetTestLed();
break;
case UsbCommandId_GetDebugBuffer: case UsbCommandId_GetDebugBuffer:
UsbCommand_GetDebugBuffer(); UsbCommand_GetDebugBuffer();
break; break;
case UsbCommandId_JumpToModuleBootloader: case UsbCommandId_GetAdcValue:
UsbCommand_JumpToModuleBootloader(); UsbCommand_GetAdcValue();
break; break;
case UsbCommandId_SendKbootCommandToModule: case UsbCommandId_SetLedPwmBrightness:
UsbCommand_SendKbootCommandToModule(); UsbCommand_SetLedPwmBrightness();
break; break;
default: default:
SetUsbTxBufferUint8(0, UsbStatusCode_InvalidCommand); SetUsbTxBufferUint8(0, UsbStatusCode_InvalidCommand);

View File

@@ -16,20 +16,20 @@
UsbCommandId_GetProperty = 0x00, UsbCommandId_GetProperty = 0x00,
UsbCommandId_Reenumerate = 0x01, UsbCommandId_Reenumerate = 0x01,
UsbCommandId_JumpToModuleBootloader = 0x02, // was 0x12 UsbCommandId_JumpToModuleBootloader = 0x02,
UsbCommandId_SendKbootCommandToModule = 0x03, // was 0x13 UsbCommandId_SendKbootCommandToModule = 0x03,
UsbCommandId_ReadConfig = 0x04, // was 0x0d and 0x0f UsbCommandId_ReadConfig = 0x04,
UsbCommandId_WriteHardwareConfig = 0x05, // was 0x0e UsbCommandId_WriteHardwareConfig = 0x05,
UsbCommandId_WriteStagingUserConfig = 0x06, // was 0x08 UsbCommandId_WriteStagingUserConfig = 0x06,
UsbCommandId_ApplyConfig = 0x07, // was 0x09 UsbCommandId_ApplyConfig = 0x07,
UsbCommandId_LaunchEepromTransfer = 0x08, // was 0x0C UsbCommandId_LaunchEepromTransfer = 0x08,
UsbCommandId_GetKeyboardState = 0x10, UsbCommandId_GetDeviceState = 0x09,
UsbCommandId_SetTestLed = 0x14, // was 0x02 UsbCommandId_SetTestLed = 0x0a,
UsbCommandId_GetDebugBuffer = 0x11, UsbCommandId_GetDebugBuffer = 0x0b,
UsbCommandId_GetAdcValue = 0x0B, UsbCommandId_GetAdcValue = 0x0c,
UsbCommandId_SetLedPwmBrightness = 0x0A, UsbCommandId_SetLedPwmBrightness = 0x0d,
} usb_command_id_t; } usb_command_id_t;
typedef enum { typedef enum {