Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
version APIs

Infuse version API . More...

Macros

#define infuse_version   mcuboot_img_sem_ver
 
#define INFUSE_VERSION_INT(v)
 Convert version struct to sortable integer.
 

Functions

struct mcuboot_img_sem_ver application_version_get (void)
 Get version of the currently running application.
 
static int infuse_version_compare (struct mcuboot_img_sem_ver *a, struct mcuboot_img_sem_ver *b)
 Compare two version structures.
 

Detailed Description

Infuse version API .

Macro Definition Documentation

◆ infuse_version

#define infuse_version   mcuboot_img_sem_ver

#include <infuse/version.h>

◆ INFUSE_VERSION_INT

#define INFUSE_VERSION_INT ( v)

#include <infuse/version.h>

Value:
((((uint32_t)(v)->major) << 24) | (((uint32_t)(v)->minor) << 16) | \
((uint32_t)(v)->revision))

Convert version struct to sortable integer.

Parameters
vstruct infuse_version pointer
Return values
uint32_tequivalent integer

Function Documentation

◆ application_version_get()

struct mcuboot_img_sem_ver application_version_get ( void )

#include <infuse/version.h>

Get version of the currently running application.

Returns
Current application version

◆ infuse_version_compare()

static int infuse_version_compare ( struct mcuboot_img_sem_ver * a,
struct mcuboot_img_sem_ver * b )
inlinestatic

#include <infuse/version.h>

Compare two version structures.

Return value follows the convention of the C library qsort function.

Note
The build_num field is ignored for comparison purposes.
Parameters
aFirst version to compare
bSecond version to compare
Return values
1a is an earlier version than b
-1a is a later version than b
0if a and b are the same version