mirror of https://github.com/ARMmbed/mbed-os.git
Update stats to fetch Mbed OS version info
parent
c5ba97fbe0
commit
b05d105493
|
@ -32,6 +32,7 @@ void test_sys_info()
|
|||
mbed_stats_sys_t stats;
|
||||
mbed_stats_sys_get(&stats);
|
||||
|
||||
TEST_ASSERT_NOT_EQUAL(0, stats.os_version);
|
||||
#if defined(__CORTEX_M)
|
||||
TEST_ASSERT_NOT_EQUAL(0, stats.cpu_id);
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "mbed_assert.h"
|
||||
#include "mbed_stats.h"
|
||||
#include "mbed_power_mgmt.h"
|
||||
#include "mbed_version.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -123,6 +124,7 @@ void mbed_stats_sys_get(mbed_stats_sys_t *stats)
|
|||
memset(stats, 0, sizeof(mbed_stats_sys_t));
|
||||
|
||||
#if defined(MBED_SYS_STATS_ENABLED)
|
||||
stats->os_version = MBED_VERSION;
|
||||
#if defined(__CORTEX_M)
|
||||
stats->cpu_id = SCB->CPUID;
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @{
|
||||
*/
|
||||
/* mbed Microcontroller Library
|
||||
* Copyright (c) 2016-2016 ARM Limited
|
||||
* Copyright (c) 2016-2018 ARM Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
Loading…
Reference in New Issue