2021-02-18 15:49:32 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string.h>
|
2021-04-19 19:30:25 +03:00
|
|
|
#include <version.h>
|
2021-02-18 15:49:32 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-03-24 12:35:33 +03:00
|
|
|
/** Check target firmware version */
|
2021-02-18 15:49:32 +03:00
|
|
|
bool api_hal_version_do_i_belong_here();
|
|
|
|
|
2021-03-24 12:35:33 +03:00
|
|
|
/** Get hardware version */
|
2021-02-18 15:49:32 +03:00
|
|
|
const uint8_t api_hal_version_get_hw_version();
|
|
|
|
|
2021-03-24 12:35:33 +03:00
|
|
|
/** Get hardware target */
|
2021-02-18 15:49:32 +03:00
|
|
|
const uint8_t api_hal_version_get_hw_target();
|
|
|
|
|
2021-03-24 12:35:33 +03:00
|
|
|
/** Get hardware body */
|
2021-02-18 15:49:32 +03:00
|
|
|
const uint8_t api_hal_version_get_hw_body();
|
|
|
|
|
2021-03-24 12:35:33 +03:00
|
|
|
/** Get hardware connect */
|
2021-02-18 15:49:32 +03:00
|
|
|
const uint8_t api_hal_version_get_hw_connect();
|
|
|
|
|
2021-03-24 12:35:33 +03:00
|
|
|
/** Get hardware timestamp */
|
2021-02-18 15:49:32 +03:00
|
|
|
const uint32_t api_hal_version_get_hw_timestamp();
|
|
|
|
|
2021-03-24 12:35:33 +03:00
|
|
|
/** Get pointer to target name */
|
2021-03-12 12:18:13 +03:00
|
|
|
const char * api_hal_version_get_name_ptr();
|
|
|
|
|
2021-04-19 19:30:25 +03:00
|
|
|
/**
|
|
|
|
* Get address of version structure of bootloader, stored in chip flash.
|
|
|
|
*
|
|
|
|
* @return Address of boot version structure.
|
|
|
|
*/
|
|
|
|
const struct Version* api_hal_version_get_boot_version(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get address of version structure of firmware.
|
|
|
|
*
|
|
|
|
* @return Address of firmware version structure.
|
|
|
|
*/
|
|
|
|
const struct Version* api_hal_version_get_fw_version(void);
|
|
|
|
|
2021-02-18 15:49:32 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|