[FL-1464] Cli: merge version and hwinfo into device_info (#553)

* Cli: merge version and hwinfo and form machine/human readable key value set.
* Backport F6 changes to F5. Add readme to cli_command_device_info rountine
* Cli: return proper order to radio stack version in device_info command

Co-authored-by: SG <who.just.the.doctor@gmail.com>
This commit is contained in:
あく
2021-07-02 03:58:31 +03:00
committed by GitHub
parent d088c28659
commit 5d14dce013
11 changed files with 181 additions and 77 deletions

View File

@@ -1,18 +0,0 @@
#pragma once
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Get platform UID size in bytes */
size_t api_hal_uid_size();
/** Get const pointer to UID */
const uint8_t* api_hal_uid();
#ifdef __cplusplus
}
#endif

View File

@@ -15,6 +15,9 @@ void api_hal_version_init();
/** Check target firmware version */
bool api_hal_version_do_i_belong_here();
/** Get model name */
const char* api_hal_version_get_model_name();
/** Get hardware version */
const uint8_t api_hal_version_get_hw_version();
@@ -24,9 +27,15 @@ const uint8_t api_hal_version_get_hw_target();
/** Get hardware body */
const uint8_t api_hal_version_get_hw_body();
/** Get hardware body color */
const uint8_t api_hal_version_get_hw_color();
/** Get hardware connect */
const uint8_t api_hal_version_get_hw_connect();
/** Get hardware region */
const uint8_t api_hal_version_get_hw_region();
/** Get hardware timestamp */
const uint32_t api_hal_version_get_hw_timestamp();
@@ -39,6 +48,8 @@ const char* api_hal_version_get_device_name_ptr();
/** Get pointer to target ble local device name */
const char* api_hal_version_get_ble_local_device_name_ptr();
const uint8_t* api_hal_version_get_ble_mac();
/**
* Get address of version structure of bootloader, stored in chip flash.
*
@@ -51,7 +62,13 @@ const struct Version* api_hal_version_get_boot_version(void);
*
* @return Address of firmware version structure.
*/
const struct Version* api_hal_version_get_fw_version(void);
const struct Version* api_hal_version_get_firmware_version(void);
/** Get platform UID size in bytes */
size_t api_hal_version_uid_size();
/** Get const pointer to UID */
const uint8_t* api_hal_version_uid();
#ifdef __cplusplus
}

View File

@@ -16,7 +16,6 @@ template <unsigned int N> struct STOP_EXTERNING_ME {};
#include "api-hal-power.h"
#include "api-hal-vcp.h"
#include "api-hal-version.h"
#include "api-hal-uid.h"
#include "api-hal-bt.h"
#include "api-hal-spi.h"
#include "api-hal-flash.h"