MCUmgr img_mgmt API.
More...
MCUmgr img_mgmt API.
◆ IMG_MGMT_DATA_SHA_LEN
#define IMG_MGMT_DATA_SHA_LEN 32 /* SHA256 */ |
◆ IMG_MGMT_HASH_LEN
#define IMG_MGMT_HASH_LEN 32 |
◆ IMG_MGMT_HASH_STR
#define IMG_MGMT_HASH_STR 48 |
◆ IMG_MGMT_ID_CORELIST
#define IMG_MGMT_ID_CORELIST 3 |
◆ IMG_MGMT_ID_CORELOAD
#define IMG_MGMT_ID_CORELOAD 4 |
◆ IMG_MGMT_ID_ERASE
#define IMG_MGMT_ID_ERASE 5 |
◆ IMG_MGMT_ID_FILE
#define IMG_MGMT_ID_FILE 2 |
◆ IMG_MGMT_ID_STATE
#define IMG_MGMT_ID_STATE 0 |
◆ IMG_MGMT_ID_UPLOAD
#define IMG_MGMT_ID_UPLOAD 1 |
◆ IMG_MGMT_STATE_F_ACTIVE
#define IMG_MGMT_STATE_F_ACTIVE 0x04 |
◆ IMG_MGMT_STATE_F_CONFIRMED
#define IMG_MGMT_STATE_F_CONFIRMED 0x02 |
◆ IMG_MGMT_STATE_F_PENDING
#define IMG_MGMT_STATE_F_PENDING 0x01 |
◆ IMG_MGMT_STATE_F_PERMANENT
#define IMG_MGMT_STATE_F_PERMANENT 0x08 |
◆ IMG_MGMT_SWAP_TYPE_NONE
#define IMG_MGMT_SWAP_TYPE_NONE 0 |
◆ IMG_MGMT_SWAP_TYPE_PERM
#define IMG_MGMT_SWAP_TYPE_PERM 2 |
◆ IMG_MGMT_SWAP_TYPE_REVERT
#define IMG_MGMT_SWAP_TYPE_REVERT 3 |
◆ IMG_MGMT_SWAP_TYPE_TEST
#define IMG_MGMT_SWAP_TYPE_TEST 1 |
◆ IMG_MGMT_SWAP_TYPE_UNKNOWN
#define IMG_MGMT_SWAP_TYPE_UNKNOWN 255 |
◆ IMG_MGMT_UPLOAD_ACTION_RC_RSN
#define IMG_MGMT_UPLOAD_ACTION_RC_RSN |
( |
|
action | ) |
NULL |
◆ IMG_MGMT_UPLOAD_ACTION_SET_RC_RSN
#define IMG_MGMT_UPLOAD_ACTION_SET_RC_RSN |
( |
|
action, |
|
|
|
rsn |
|
) |
| |
◆ IMG_MGMT_VER_MAX_STR_LEN
#define IMG_MGMT_VER_MAX_STR_LEN (sizeof("255.255.65535.4294967295")) |
◆ img_mgmt_id_upload_t
◆ img_mgmt_my_version()
◆ img_mgmt_read_info()
◆ img_mgmt_slot_in_use()
int img_mgmt_slot_in_use |
( |
int |
slot | ) |
|
#include <include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h>
Check if the image slot is in use.
The check is based on MCUboot flags, not image contents. This means that slot with image in it, but no bootable flags set, is considered empty. Active slot is always in use.
- Parameters
-
- Returns
- 0 if slot is not used, non-0 otherwise.
◆ img_mgmt_state_any_pending()
int img_mgmt_state_any_pending |
( |
void |
| ) |
|
#include <include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h>
Check if any slot is in MCUboot pending state.
Function returns 1 if slot 0 or slot 1 is in MCUboot pending state, which means that it has been either marked for test or confirmed.
- Returns
- 1 if there's pending DFU otherwise 0.
◆ img_mgmt_state_confirm()
int img_mgmt_state_confirm |
( |
void |
| ) |
|
◆ img_mgmt_state_flags()
uint8_t img_mgmt_state_flags |
( |
int |
query_slot | ) |
|
#include <include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h>
Returns state flags set to slot.
Flags are translated from MCUboot image state flags. Returned value is zero if no flags are set or a combination of: IMG_MGMT_STATE_F_PENDING IMG_MGMT_STATE_F_CONFIRMED IMG_MGMT_STATE_F_ACTIVE IMG_MGMT_STATE_F_PERMANENT
- Parameters
-
- Returns
- return the state flags.
◆ img_mgmt_state_set_pending()
int img_mgmt_state_set_pending |
( |
int |
slot, |
|
|
int |
permanent |
|
) |
| |
#include <include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h>
Sets the pending flag for the specified image slot.
Sets specified image slot to be used as active slot during next boot, either for test or permanently. Non-permanent image will be reverted unless image confirms itself during next boot.
- Parameters
-
slot | slot number |
permanent | permanent or test only |
- Returns
- 0 on success, non-zero on failure
◆ img_mgmt_ver_str()
int img_mgmt_ver_str |
( |
const struct image_version * |
ver, |
|
|
char * |
dst |
|
) |
| |
◆ img_mgmt_vercmp()
◆ boot_current_slot
◆ g_img_mgmt_state