Loading...
Searching...
No Matches
furi_hal_version.h File Reference

Version HAL API. More...

#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <lib/toolbox/version.h>

Go to the source code of this file.

Macros

#define FURI_HAL_VERSION_NAME_LENGTH   8
 
#define FURI_HAL_VERSION_ARRAY_NAME_LENGTH   (FURI_HAL_VERSION_NAME_LENGTH + 1)
 
#define FURI_HAL_VERSION_DEVICE_NAME_LENGTH   (1 + 8 + FURI_HAL_VERSION_ARRAY_NAME_LENGTH)
 BLE symbol + "Flipper " + name.
 

Enumerations

enum  FuriHalVersionOtpVersion {
  FuriHalVersionOtpVersion0 = 0x00 , FuriHalVersionOtpVersion1 = 0x01 , FuriHalVersionOtpVersion2 = 0x02 , FuriHalVersionOtpVersionEmpty = 0xFFFFFFFE ,
  FuriHalVersionOtpVersionUnknown = 0xFFFFFFFF
}
 OTP Versions enum.
 
enum  FuriHalVersionColor { FuriHalVersionColorUnknown = 0x00 , FuriHalVersionColorBlack = 0x01 , FuriHalVersionColorWhite = 0x02 , FuriHalVersionColorTransparent = 0x03 }
 Device Colors.
 
enum  FuriHalVersionRegion {
  FuriHalVersionRegionUnknown = 0x00 , FuriHalVersionRegionEuRu = 0x01 , FuriHalVersionRegionUsCaAu = 0x02 , FuriHalVersionRegionJp = 0x03 ,
  FuriHalVersionRegionWorld = 0x04
}
 Device Regions.
 
enum  FuriHalVersionDisplay { FuriHalVersionDisplayUnknown = 0x00 , FuriHalVersionDisplayErc = 0x01 , FuriHalVersionDisplayMgg = 0x02 }
 Device Display.
 

Functions

void furi_hal_version_init (void)
 Init flipper version.
 
bool furi_hal_version_do_i_belong_here (void)
 Check target firmware version.
 
const char * furi_hal_version_get_model_name (void)
 Get model name.
 
const char * furi_hal_version_get_model_code (void)
 Get model name.
 
const char * furi_hal_version_get_fcc_id (void)
 Get FCC ID.
 
const char * furi_hal_version_get_ic_id (void)
 Get IC id.
 
const char * furi_hal_version_get_mic_id (void)
 Get MIC id.
 
const char * furi_hal_version_get_srrc_id (void)
 Get SRRC id.
 
const char * furi_hal_version_get_ncc_id (void)
 Get NCC id.
 
FuriHalVersionOtpVersion furi_hal_version_get_otp_version (void)
 Get OTP version.
 
uint8_t furi_hal_version_get_hw_version (void)
 Get hardware version.
 
uint8_t furi_hal_version_get_hw_target (void)
 Get hardware target.
 
uint8_t furi_hal_version_get_hw_body (void)
 Get hardware body.
 
FuriHalVersionColor furi_hal_version_get_hw_color (void)
 Get hardware body color.
 
uint8_t furi_hal_version_get_hw_connect (void)
 Get hardware connect.
 
FuriHalVersionRegion furi_hal_version_get_hw_region (void)
 Get hardware region.
 
const char * furi_hal_version_get_hw_region_name (void)
 Get hardware region name.
 
FuriHalVersionDisplay furi_hal_version_get_hw_display (void)
 Get hardware display id.
 
uint32_t furi_hal_version_get_hw_timestamp (void)
 Get hardware timestamp.
 
const char * furi_hal_version_get_name_ptr (void)
 Get pointer to target name.
 
const char * furi_hal_version_get_device_name_ptr (void)
 Get pointer to target device name.
 
const char * furi_hal_version_get_ble_local_device_name_ptr (void)
 Get pointer to target ble local device name.
 
const uint8_t * furi_hal_version_get_ble_mac (void)
 Get BLE MAC address.
 
const struct Versionfuri_hal_version_get_firmware_version (void)
 Get address of version structure of firmware.
 
size_t furi_hal_version_uid_size (void)
 Get platform UID size in bytes.
 
const uint8_t * furi_hal_version_uid (void)
 Get const pointer to UID.
 

Detailed Description

Version HAL API.

Function Documentation

◆ furi_hal_version_do_i_belong_here()

bool furi_hal_version_do_i_belong_here ( void )

Check target firmware version.

Returns
true if target and real matches

◆ furi_hal_version_get_ble_local_device_name_ptr()

const char * furi_hal_version_get_ble_local_device_name_ptr ( void )

Get pointer to target ble local device name.

Returns
Ble Device Name C-string

◆ furi_hal_version_get_ble_mac()

const uint8_t * furi_hal_version_get_ble_mac ( void )

Get BLE MAC address.

Returns
pointer to BLE MAC address

◆ furi_hal_version_get_device_name_ptr()

const char * furi_hal_version_get_device_name_ptr ( void )

Get pointer to target device name.

Returns
Hardware Device Name C-string

◆ furi_hal_version_get_fcc_id()

const char * furi_hal_version_get_fcc_id ( void )

Get FCC ID.

Returns
FCC id as C-string

◆ furi_hal_version_get_firmware_version()

const struct Version * furi_hal_version_get_firmware_version ( void )

Get address of version structure of firmware.

Returns
Address of firmware version structure.

◆ furi_hal_version_get_hw_body()

uint8_t furi_hal_version_get_hw_body ( void )

Get hardware body.

Returns
Hardware Body

◆ furi_hal_version_get_hw_color()

FuriHalVersionColor furi_hal_version_get_hw_color ( void )

Get hardware body color.

Returns
Hardware Color

◆ furi_hal_version_get_hw_connect()

uint8_t furi_hal_version_get_hw_connect ( void )

Get hardware connect.

Returns
Hardware Interconnect

◆ furi_hal_version_get_hw_display()

FuriHalVersionDisplay furi_hal_version_get_hw_display ( void )

Get hardware display id.

Returns
Display id

◆ furi_hal_version_get_hw_region()

FuriHalVersionRegion furi_hal_version_get_hw_region ( void )

Get hardware region.

Returns
Hardware Region

◆ furi_hal_version_get_hw_region_name()

const char * furi_hal_version_get_hw_region_name ( void )

Get hardware region name.

Returns
Hardware Region name

◆ furi_hal_version_get_hw_target()

uint8_t furi_hal_version_get_hw_target ( void )

Get hardware target.

Returns
Hardware Target

◆ furi_hal_version_get_hw_timestamp()

uint32_t furi_hal_version_get_hw_timestamp ( void )

Get hardware timestamp.

Returns
Hardware Manufacture timestamp

◆ furi_hal_version_get_hw_version()

uint8_t furi_hal_version_get_hw_version ( void )

Get hardware version.

Returns
Hardware Version

◆ furi_hal_version_get_ic_id()

const char * furi_hal_version_get_ic_id ( void )

Get IC id.

Returns
IC id as C-string

◆ furi_hal_version_get_mic_id()

const char * furi_hal_version_get_mic_id ( void )

Get MIC id.

Returns
MIC id as C-string

◆ furi_hal_version_get_model_code()

const char * furi_hal_version_get_model_code ( void )

Get model name.

Returns
model code C-string

◆ furi_hal_version_get_model_name()

const char * furi_hal_version_get_model_name ( void )

Get model name.

Returns
model name C-string

◆ furi_hal_version_get_name_ptr()

const char * furi_hal_version_get_name_ptr ( void )

Get pointer to target name.

Returns
Hardware Name C-string

◆ furi_hal_version_get_ncc_id()

const char * furi_hal_version_get_ncc_id ( void )

Get NCC id.

Returns
NCC id as C-string

◆ furi_hal_version_get_otp_version()

FuriHalVersionOtpVersion furi_hal_version_get_otp_version ( void )

Get OTP version.

Returns
OTP Version

◆ furi_hal_version_get_srrc_id()

const char * furi_hal_version_get_srrc_id ( void )

Get SRRC id.

Returns
SRRC id as C-string

◆ furi_hal_version_uid()

const uint8_t * furi_hal_version_uid ( void )

Get const pointer to UID.

Returns
pointer to UID

◆ furi_hal_version_uid_size()

size_t furi_hal_version_uid_size ( void )

Get platform UID size in bytes.

Returns
UID size in bytes