Implement DevicePropertyId_Uptime
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
#include "init_peripherals.h"
|
#include "init_peripherals.h"
|
||||||
#include "fsl_i2c.h"
|
#include "fsl_i2c.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
version_t deviceProtocolVersion = {
|
version_t deviceProtocolVersion = {
|
||||||
DEVICE_PROTOCOL_MAJOR_VERSION,
|
DEVICE_PROTOCOL_MAJOR_VERSION,
|
||||||
@@ -67,6 +68,9 @@ void UsbCommand_GetDeviceProperty(void)
|
|||||||
SetUsbTxBufferUint32(2, I2cMainBusRequestedBaudRateBps);
|
SetUsbTxBufferUint32(2, I2cMainBusRequestedBaudRateBps);
|
||||||
SetUsbTxBufferUint32(6, I2cMainBusActualBaudRateBps);
|
SetUsbTxBufferUint32(6, I2cMainBusActualBaudRateBps);
|
||||||
break;
|
break;
|
||||||
|
case DevicePropertyId_Uptime:
|
||||||
|
SetUsbTxBufferUint32(1, CurrentTime);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
SetUsbTxBufferUint8(0, UsbStatusCode_GetDeviceProperty_InvalidProperty);
|
SetUsbTxBufferUint8(0, UsbStatusCode_GetDeviceProperty_InvalidProperty);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
DevicePropertyId_ConfigSizes = 2,
|
DevicePropertyId_ConfigSizes = 2,
|
||||||
DevicePropertyId_CurrentKbootCommand = 3,
|
DevicePropertyId_CurrentKbootCommand = 3,
|
||||||
DevicePropertyId_I2cMainBusBaudRate = 4,
|
DevicePropertyId_I2cMainBusBaudRate = 4,
|
||||||
|
DevicePropertyId_Uptime = 5,
|
||||||
} device_property_t;
|
} device_property_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
Reference in New Issue
Block a user