Implement DevicePropertyId_Uptime

This commit is contained in:
László Monda
2018-01-14 18:32:18 +01:00
parent c854e98d84
commit 2661c3d909
2 changed files with 5 additions and 0 deletions

View File

@@ -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;