mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-25 04:03:07 +00:00
c5b460b416
* hal: device_info: added API version to "firmware.api.major" & "firmware.api.minor" * FuriHal: bump device info version Co-authored-by: あく <alleteam@gmail.com>
28 lines
No EOL
904 B
C++
28 lines
No EOL
904 B
C++
#include "firmware_api.h"
|
|
|
|
#include <flipper_application/api_hashtable/api_hashtable.h>
|
|
#include <flipper_application/api_hashtable/compilesort.hpp>
|
|
|
|
/* Generated table */
|
|
#include <firmware_api_table.h>
|
|
|
|
#include <furi_hal_info.h>
|
|
|
|
static_assert(!has_hash_collisions(elf_api_table), "Detected API method hash collision!");
|
|
|
|
constexpr HashtableApiInterface elf_api_interface{
|
|
{
|
|
.api_version_major = (elf_api_version >> 16),
|
|
.api_version_minor = (elf_api_version & 0xFFFF),
|
|
.resolver_callback = &elf_resolve_from_hashtable,
|
|
},
|
|
.table_cbegin = elf_api_table.cbegin(),
|
|
.table_cend = elf_api_table.cend(),
|
|
};
|
|
|
|
const ElfApiInterface* const firmware_api_interface = &elf_api_interface;
|
|
|
|
extern "C" void furi_hal_info_get_api_version(uint16_t* major, uint16_t* minor) {
|
|
*major = elf_api_interface.api_version_major;
|
|
*minor = elf_api_interface.api_version_minor;
|
|
} |