Flipper Zero Firmware
Loading...
Searching...
No Matches
furi_hal_version.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <stdbool.h>
9#include <stdint.h>
10#include <string.h>
11#include <lib/toolbox/version.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#define FURI_HAL_VERSION_NAME_LENGTH 8
18#define FURI_HAL_VERSION_ARRAY_NAME_LENGTH (FURI_HAL_VERSION_NAME_LENGTH + 1)
20#define FURI_HAL_VERSION_DEVICE_NAME_LENGTH (1 + 8 + FURI_HAL_VERSION_ARRAY_NAME_LENGTH)
21
23typedef enum {
24 FuriHalVersionOtpVersion0 = 0x00,
25 FuriHalVersionOtpVersion1 = 0x01,
26 FuriHalVersionOtpVersion2 = 0x02,
27 FuriHalVersionOtpVersionEmpty = 0xFFFFFFFE,
28 FuriHalVersionOtpVersionUnknown = 0xFFFFFFFF,
30
32typedef enum {
33 FuriHalVersionColorUnknown = 0x00,
34 FuriHalVersionColorBlack = 0x01,
35 FuriHalVersionColorWhite = 0x02,
36 FuriHalVersionColorTransparent = 0x03,
38
40typedef enum {
41 FuriHalVersionRegionUnknown = 0x00,
42 FuriHalVersionRegionEuRu = 0x01,
43 FuriHalVersionRegionUsCaAu = 0x02,
44 FuriHalVersionRegionJp = 0x03,
45 FuriHalVersionRegionWorld = 0x04,
47
49typedef enum {
50 FuriHalVersionDisplayUnknown = 0x00,
51 FuriHalVersionDisplayErc = 0x01,
52 FuriHalVersionDisplayMgg = 0x02,
54
57void furi_hal_version_init(void);
58
64
69const char* furi_hal_version_get_model_name(void);
70
75const char* furi_hal_version_get_model_code(void);
76
81const char* furi_hal_version_get_fcc_id(void);
82
87const char* furi_hal_version_get_ic_id(void);
88
93const char* furi_hal_version_get_mic_id(void);
94
99const char* furi_hal_version_get_srrc_id(void);
100
105const char* furi_hal_version_get_ncc_id(void);
106
112
118
124
129uint8_t furi_hal_version_get_hw_body(void);
130
136
142
148
154
160
166
171const char* furi_hal_version_get_name_ptr(void);
172
178
184
189const uint8_t* furi_hal_version_get_ble_mac(void);
190
196
201size_t furi_hal_version_uid_size(void);
202
207const uint8_t* furi_hal_version_uid(void);
208
209#ifdef __cplusplus
210}
211#endif
FuriHalVersionRegion furi_hal_version_get_hw_region(void)
Get hardware region.
Definition furi_hal_version.c:241
const char * furi_hal_version_get_hw_region_name(void)
Get hardware region name.
Definition furi_hal_version.c:245
const char * furi_hal_version_get_model_name(void)
Get model name.
Definition f18/furi_hal/furi_hal_version_device.c:7
const char * furi_hal_version_get_model_code(void)
Get model name.
Definition f18/furi_hal/furi_hal_version_device.c:11
bool furi_hal_version_do_i_belong_here(void)
Check target firmware version.
Definition f18/furi_hal/furi_hal_version_device.c:3
const struct Version * furi_hal_version_get_firmware_version(void)
Get address of version structure of firmware.
Definition furi_hal_version.c:285
FuriHalVersionOtpVersion furi_hal_version_get_otp_version(void)
Get OTP version.
Definition furi_hal_version.c:198
uint8_t furi_hal_version_get_hw_body(void)
Get hardware body.
Definition furi_hal_version.c:229
FuriHalVersionColor
Device Colors.
Definition furi_hal_version.h:32
const char * furi_hal_version_get_ncc_id(void)
Get NCC id.
Definition f18/furi_hal/furi_hal_version_device.c:31
const char * furi_hal_version_get_srrc_id(void)
Get SRRC id.
Definition f18/furi_hal/furi_hal_version_device.c:27
void furi_hal_version_init(void)
Init flipper version.
Definition furi_hal_version.c:174
uint32_t furi_hal_version_get_hw_timestamp(void)
Get hardware timestamp.
Definition furi_hal_version.c:265
const char * furi_hal_version_get_fcc_id(void)
Get FCC ID.
Definition f18/furi_hal/furi_hal_version_device.c:15
const char * furi_hal_version_get_device_name_ptr(void)
Get pointer to target device name.
Definition furi_hal_version.c:273
FuriHalVersionRegion
Device Regions.
Definition furi_hal_version.h:40
uint8_t furi_hal_version_get_hw_target(void)
Get hardware target.
Definition furi_hal_version.c:225
FuriHalVersionDisplay
Device Display.
Definition furi_hal_version.h:49
const char * furi_hal_version_get_ic_id(void)
Get IC id.
Definition f18/furi_hal/furi_hal_version_device.c:19
uint8_t furi_hal_version_get_hw_version(void)
Get hardware version.
Definition furi_hal_version.c:221
FuriHalVersionOtpVersion
OTP Versions enum.
Definition furi_hal_version.h:23
FuriHalVersionDisplay furi_hal_version_get_hw_display(void)
Get hardware display id.
Definition furi_hal_version.c:261
const char * furi_hal_version_get_name_ptr(void)
Get pointer to target name.
Definition furi_hal_version.c:269
FuriHalVersionColor furi_hal_version_get_hw_color(void)
Get hardware body color.
Definition furi_hal_version.c:233
size_t furi_hal_version_uid_size(void)
Get platform UID size in bytes.
Definition furi_hal_version.c:289
const char * furi_hal_version_get_mic_id(void)
Get MIC id.
Definition f18/furi_hal/furi_hal_version_device.c:23
uint8_t furi_hal_version_get_hw_connect(void)
Get hardware connect.
Definition furi_hal_version.c:237
const char * furi_hal_version_get_ble_local_device_name_ptr(void)
Get pointer to target ble local device name.
Definition furi_hal_version.c:277
const uint8_t * furi_hal_version_uid(void)
Get const pointer to UID.
Definition furi_hal_version.c:293
const uint8_t * furi_hal_version_get_ble_mac(void)
Get BLE MAC address.
Definition furi_hal_version.c:281
Furi string primitive.
Definition version.c:10