Extract system properties as enums.

This commit is contained in:
László Monda
2017-07-23 00:53:27 +02:00
parent d8825cc617
commit b87cafd10e
2 changed files with 11 additions and 8 deletions

View File

@@ -10,10 +10,6 @@
#define PROTOCOL_RESPONSE_SUCCESS 0
#define PROTOCOL_RESPONSE_GENERIC_ERROR 1
#define SYSTEM_PROPERTY_USB_PROTOCOL_VERSION_ID 0
#define SYSTEM_PROPERTY_BRIDGE_PROTOCOL_VERSION_ID 1
#define SYSTEM_PROPERTY_DATA_MODEL_VERSION_ID 2
#define SYSTEM_PROPERTY_FIRMWARE_VERSION_ID 3
#define WRITE_LED_DRIVER_RESPONSE_INVALID_ADDRESS 1
#define WRITE_LED_DRIVER_RESPONSE_INVALID_PAYLOAD_SIZE 2
#define WRITE_EEPROM_RESPONSE_INVALID_PAYLOAD_SIZE 1
@@ -36,6 +32,13 @@
UsbCommand_LaunchEepromTransfer = 12,
} usb_command_t;
typedef enum {
SystemProperty_UsbProtocolVersionId = 0,
SystemProperty_BridgeProtocolVersionId = 1,
SystemProperty_DataModelVersionId = 2,
SystemProperty_FirmwareVersionId = 3,
} system_property_t;
// Functions:
extern void usbProtocolHandler();