2021-02-18 12:49:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string.h>
|
2021-04-19 16:30:25 +00:00
|
|
|
#include <version.h>
|
2021-02-18 12:49:32 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-05-24 18:06:53 +00:00
|
|
|
/** Init flipper version */
|
|
|
|
void api_hal_version_init();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Check target firmware version */
|
2021-02-18 12:49:32 +00:00
|
|
|
bool api_hal_version_do_i_belong_here();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get hardware version */
|
2021-02-18 12:49:32 +00:00
|
|
|
const uint8_t api_hal_version_get_hw_version();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get hardware target */
|
2021-02-18 12:49:32 +00:00
|
|
|
const uint8_t api_hal_version_get_hw_target();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get hardware body */
|
2021-02-18 12:49:32 +00:00
|
|
|
const uint8_t api_hal_version_get_hw_body();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get hardware connect */
|
2021-02-18 12:49:32 +00:00
|
|
|
const uint8_t api_hal_version_get_hw_connect();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get hardware timestamp */
|
2021-02-18 12:49:32 +00:00
|
|
|
const uint32_t api_hal_version_get_hw_timestamp();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get pointer to target name */
|
2021-06-07 16:05:47 +00:00
|
|
|
const char* api_hal_version_get_name_ptr();
|
|
|
|
|
|
|
|
/** Get pointer to target device name */
|
|
|
|
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();
|
2021-03-12 09:18:13 +00:00
|
|
|
|
2021-04-19 16:30:25 +00: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 12:49:32 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|