Rename the GetProperty command to GetDeviceProperty.

This commit is contained in:
László Monda
2017-12-23 16:11:47 +01:00
parent 36951d1a34
commit 1ac637af0f
4 changed files with 12 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
#include "fsl_common.h" #include "fsl_common.h"
#include "usb_commands/usb_command_get_property.h" #include "usb_commands/usb_command_get_device_property.h"
#include "usb_protocol_handler.h" #include "usb_protocol_handler.h"
#include "eeprom.h" #include "eeprom.h"
#include "versions.h" #include "versions.h"
@@ -41,7 +41,7 @@ version_t protocolVersions[] =
uint16_t configSizes[] = {HARDWARE_CONFIG_SIZE, USER_CONFIG_SIZE}; uint16_t configSizes[] = {HARDWARE_CONFIG_SIZE, USER_CONFIG_SIZE};
void UsbCommand_GetProperty(void) void UsbCommand_GetDeviceProperty(void)
{ {
uint8_t propertyId = GetUsbRxBufferUint8(1); uint8_t propertyId = GetUsbRxBufferUint8(1);
@@ -56,7 +56,7 @@ void UsbCommand_GetProperty(void)
memcpy(GenericHidOutBuffer+1, (uint8_t*)&configSizes, sizeof(configSizes)); memcpy(GenericHidOutBuffer+1, (uint8_t*)&configSizes, sizeof(configSizes));
break; break;
default: default:
SetUsbTxBufferUint8(0, UsbStatusCode_GetProperty_InvalidProperty); SetUsbTxBufferUint8(0, UsbStatusCode_GetDeviceProperty_InvalidProperty);
break; break;
} }
} }

View File

@@ -1,5 +1,5 @@
#ifndef __USB_COMMAND_GET_PROPERTY_H__ #ifndef __USB_COMMAND_GET_DEVICE_PROPERTY_H__
#define __USB_COMMAND_GET_PROPERTY_H__ #define __USB_COMMAND_GET_DEVICE_PROPERTY_H__
// Typedefs: // Typedefs:
@@ -10,11 +10,11 @@
} system_property_t; } system_property_t;
typedef enum { typedef enum {
UsbStatusCode_GetProperty_InvalidProperty = 2, UsbStatusCode_GetDeviceProperty_InvalidProperty = 2,
} usb_status_code_get_property_t; } usb_status_code_get_device_property_t;
// Functions: // Functions:
void UsbCommand_GetProperty(void); void UsbCommand_GetDeviceProperty(void);
#endif #endif

View File

@@ -1,6 +1,6 @@
#include "usb_protocol_handler.h" #include "usb_protocol_handler.h"
#include "buffer.h" #include "buffer.h"
#include "usb_commands/usb_command_get_property.h" #include "usb_commands/usb_command_get_device_property.h"
#include "usb_commands/usb_command_get_module_property.h" #include "usb_commands/usb_command_get_module_property.h"
#include "usb_commands/usb_command_reenumerate.h" #include "usb_commands/usb_command_reenumerate.h"
#include "usb_commands/usb_command_set_test_led.h" #include "usb_commands/usb_command_set_test_led.h"
@@ -20,8 +20,8 @@ void UsbProtocolHandler(void)
bzero(GenericHidOutBuffer, USB_GENERIC_HID_OUT_BUFFER_LENGTH); bzero(GenericHidOutBuffer, USB_GENERIC_HID_OUT_BUFFER_LENGTH);
uint8_t command = GetUsbRxBufferUint8(0); uint8_t command = GetUsbRxBufferUint8(0);
switch (command) { switch (command) {
case UsbCommandId_GetProperty: case UsbCommandId_GetDeviceProperty:
UsbCommand_GetProperty(); UsbCommand_GetDeviceProperty();
break; break;
case UsbCommandId_Reenumerate: case UsbCommandId_Reenumerate:
UsbCommand_Reenumerate(); UsbCommand_Reenumerate();

View File

@@ -13,7 +13,7 @@
// Typedefs: // Typedefs:
typedef enum { typedef enum {
UsbCommandId_GetProperty = 0x00, UsbCommandId_GetDeviceProperty = 0x00,
UsbCommandId_Reenumerate = 0x01, UsbCommandId_Reenumerate = 0x01,
UsbCommandId_JumpToModuleBootloader = 0x02, UsbCommandId_JumpToModuleBootloader = 0x02,