Rename usb_command_t to usb_command_id_t and UsbCommand_* to UsbCommandId_*

This commit is contained in:
László Monda
2017-11-04 01:35:31 +01:00
parent ae3efce452
commit 457f4802d4
2 changed files with 33 additions and 33 deletions

View File

@@ -218,54 +218,54 @@ void UsbProtocolHandler(void)
bzero(GenericHidOutBuffer, USB_GENERIC_HID_OUT_BUFFER_LENGTH);
uint8_t command = GenericHidInBuffer[0];
switch (command) {
case UsbCommand_GetSystemProperty:
case UsbCommandId_GetSystemProperty:
getSystemProperty();
break;
case UsbCommand_Reenumerate:
case UsbCommandId_Reenumerate:
reenumerate();
break;
case UsbCommand_SetTestLed:
case UsbCommandId_SetTestLed:
setTestLed();
break;
case UsbCommand_WriteLedDriver:
case UsbCommandId_WriteLedDriver:
break;
case UsbCommand_ReadMergeSensor:
case UsbCommandId_ReadMergeSensor:
readMergeSensor();
break;
case UsbCommand_WriteUserConfiguration:
case UsbCommandId_WriteUserConfiguration:
writeConfiguration(false);
break;
case UsbCommandId_ApplyConfig:
UsbCommand_ApplyConfig();
break;
case UsbCommand_SetLedPwm:
case UsbCommandId_SetLedPwm:
setLedPwm();
break;
case UsbCommand_GetAdcValue:
case UsbCommandId_GetAdcValue:
getAdcValue();
break;
case UsbCommand_LaunchEepromTransfer:
case UsbCommandId_LaunchEepromTransfer:
legacyLaunchEepromTransfer();
break;
case UsbCommand_ReadHardwareConfiguration:
case UsbCommandId_ReadHardwareConfiguration:
readConfiguration(true);
break;
case UsbCommand_WriteHardwareConfiguration:
case UsbCommandId_WriteHardwareConfiguration:
writeConfiguration(true);
break;
case UsbCommand_ReadUserConfiguration:
case UsbCommandId_ReadUserConfiguration:
readConfiguration(false);
break;
case UsbCommand_GetKeyboardState:
case UsbCommandId_GetKeyboardState:
getKeyboardState();
break;
case UsbCommand_GetDebugInfo:
case UsbCommandId_GetDebugInfo:
getDebugInfo();
break;
case UsbCommand_JumpToSlaveBootloader:
case UsbCommandId_JumpToSlaveBootloader:
jumpToSlaveBootloader();
break;
case UsbCommand_SendKbootCommand:
case UsbCommandId_SendKbootCommand:
sendKbootCommand();
break;
default:

View File

@@ -8,24 +8,24 @@
// Typedefs:
typedef enum {
UsbCommand_GetSystemProperty = 0,
UsbCommand_Reenumerate = 1,
UsbCommand_SetTestLed = 2,
UsbCommand_WriteLedDriver = 3,
UsbCommand_ReadMergeSensor = 7,
UsbCommand_WriteUserConfiguration = 8,
UsbCommandId_GetSystemProperty = 0,
UsbCommandId_Reenumerate = 1,
UsbCommandId_SetTestLed = 2,
UsbCommandId_WriteLedDriver = 3,
UsbCommandId_ReadMergeSensor = 7,
UsbCommandId_WriteUserConfiguration = 8,
UsbCommandId_ApplyConfig = 9,
UsbCommand_SetLedPwm = 10,
UsbCommand_GetAdcValue = 11,
UsbCommand_LaunchEepromTransfer = 12,
UsbCommand_ReadHardwareConfiguration = 13,
UsbCommand_WriteHardwareConfiguration = 14,
UsbCommand_ReadUserConfiguration = 15,
UsbCommand_GetKeyboardState = 16,
UsbCommand_GetDebugInfo = 17,
UsbCommand_JumpToSlaveBootloader = 18,
UsbCommand_SendKbootCommand = 19,
} usb_command_t;
UsbCommandId_SetLedPwm = 10,
UsbCommandId_GetAdcValue = 11,
UsbCommandId_LaunchEepromTransfer = 12,
UsbCommandId_ReadHardwareConfiguration = 13,
UsbCommandId_WriteHardwareConfiguration = 14,
UsbCommandId_ReadUserConfiguration = 15,
UsbCommandId_GetKeyboardState = 16,
UsbCommandId_GetDebugInfo = 17,
UsbCommandId_JumpToSlaveBootloader = 18,
UsbCommandId_SendKbootCommand = 19,
} usb_command_id_t;
typedef enum {
UsbResponse_Success = 0,