unleashed-firmware/applications/services/loader/firmware_api/firmware_api.cpp
hedger ffa3996a5e
[FL-3867] Code formatting update (#3765)
* clang-format: AllowShortEnumsOnASingleLine: false
* clang-format: InsertNewlineAtEOF: true
* clang-format: Standard:        c++20
* clang-format: AlignConsecutiveBitFields
* clang-format: AlignConsecutiveMacros
* clang-format: RemoveParentheses: ReturnStatement
* clang-format: RemoveSemicolon: true
* Restored RemoveParentheses: Leave, retained general changes for it
* formatting: fixed logging TAGs
* Formatting update for dev

Co-authored-by: あく <alleteam@gmail.com>
2024-07-15 13:38:49 +09:00

28 lines
886 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,
},
elf_api_table.cbegin(),
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 = firmware_api_interface->api_version_major;
*minor = firmware_api_interface->api_version_minor;
}