Move system property enum to system_properties.h
This commit is contained in:
@@ -8,4 +8,13 @@
|
|||||||
#define SYSTEM_PROPERTY_DATA_MODEL_VERSION 1
|
#define SYSTEM_PROPERTY_DATA_MODEL_VERSION 1
|
||||||
#define SYSTEM_PROPERTY_FIRMWARE_VERSION 1
|
#define SYSTEM_PROPERTY_FIRMWARE_VERSION 1
|
||||||
|
|
||||||
|
// Typedefs:
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
SystemPropertyId_UsbProtocolVersion = 0,
|
||||||
|
SystemPropertyId_BridgeProtocolVersion = 1,
|
||||||
|
SystemPropertyId_DataModelVersion = 2,
|
||||||
|
SystemPropertyId_FirmwareVersion = 3,
|
||||||
|
} system_property_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -36,16 +36,16 @@ void getSystemProperty(void) {
|
|||||||
uint8_t propertyId = GenericHidInBuffer[1];
|
uint8_t propertyId = GenericHidInBuffer[1];
|
||||||
|
|
||||||
switch (propertyId) {
|
switch (propertyId) {
|
||||||
case SystemProperty_UsbProtocolVersionId:
|
case SystemPropertyId_UsbProtocolVersion:
|
||||||
SetResponseByte(SYSTEM_PROPERTY_USB_PROTOCOL_VERSION);
|
SetResponseByte(SYSTEM_PROPERTY_USB_PROTOCOL_VERSION);
|
||||||
break;
|
break;
|
||||||
case SystemProperty_BridgeProtocolVersionId:
|
case SystemPropertyId_BridgeProtocolVersion:
|
||||||
SetResponseByte(SYSTEM_PROPERTY_BRIDGE_PROTOCOL_VERSION);
|
SetResponseByte(SYSTEM_PROPERTY_BRIDGE_PROTOCOL_VERSION);
|
||||||
break;
|
break;
|
||||||
case SystemProperty_DataModelVersionId:
|
case SystemPropertyId_DataModelVersion:
|
||||||
SetResponseByte(SYSTEM_PROPERTY_DATA_MODEL_VERSION);
|
SetResponseByte(SYSTEM_PROPERTY_DATA_MODEL_VERSION);
|
||||||
break;
|
break;
|
||||||
case SystemProperty_FirmwareVersionId:
|
case SystemPropertyId_FirmwareVersion:
|
||||||
SetResponseByte(SYSTEM_PROPERTY_FIRMWARE_VERSION);
|
SetResponseByte(SYSTEM_PROPERTY_FIRMWARE_VERSION);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -23,13 +23,6 @@
|
|||||||
UsbCommand_ReadUserConfiguration = 15,
|
UsbCommand_ReadUserConfiguration = 15,
|
||||||
} usb_command_t;
|
} usb_command_t;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
SystemProperty_UsbProtocolVersionId = 0,
|
|
||||||
SystemProperty_BridgeProtocolVersionId = 1,
|
|
||||||
SystemProperty_DataModelVersionId = 2,
|
|
||||||
SystemProperty_FirmwareVersionId = 3,
|
|
||||||
} system_property_t;
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
UsbResponse_Success = 0,
|
UsbResponse_Success = 0,
|
||||||
UsbResponse_GenericError = 1,
|
UsbResponse_GenericError = 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user