diff --git a/right/src/usb_commands/usb_command_get_device_property.c b/right/src/usb_commands/usb_command_get_device_property.c index 1d847fb..62c1e5a 100644 --- a/right/src/usb_commands/usb_command_get_device_property.c +++ b/right/src/usb_commands/usb_command_get_device_property.c @@ -7,6 +7,7 @@ #include "i2c.h" #include "init_peripherals.h" #include "fsl_i2c.h" +#include "timer.h" version_t deviceProtocolVersion = { DEVICE_PROTOCOL_MAJOR_VERSION, @@ -67,6 +68,9 @@ void UsbCommand_GetDeviceProperty(void) SetUsbTxBufferUint32(2, I2cMainBusRequestedBaudRateBps); SetUsbTxBufferUint32(6, I2cMainBusActualBaudRateBps); break; + case DevicePropertyId_Uptime: + SetUsbTxBufferUint32(1, CurrentTime); + break; default: SetUsbTxBufferUint8(0, UsbStatusCode_GetDeviceProperty_InvalidProperty); break; diff --git a/right/src/usb_commands/usb_command_get_device_property.h b/right/src/usb_commands/usb_command_get_device_property.h index 8225ccb..4d04e54 100644 --- a/right/src/usb_commands/usb_command_get_device_property.h +++ b/right/src/usb_commands/usb_command_get_device_property.h @@ -9,6 +9,7 @@ DevicePropertyId_ConfigSizes = 2, DevicePropertyId_CurrentKbootCommand = 3, DevicePropertyId_I2cMainBusBaudRate = 4, + DevicePropertyId_Uptime = 5, } device_property_t; typedef enum {