Zephyr Project API 4.0.99
A Scalable Open Source RTOS
|
#include <inttypes.h>
#include <zephyr/mgmt/mcumgr/mgmt/mgmt.h>
#include <zephyr/mgmt/mcumgr/smp/smp.h>
#include <bootutil/image.h>
#include <zcbor_common.h>
Go to the source code of this file.
Data Structures | |
struct | img_mgmt_upload_req |
Represents an individual upload request. More... | |
struct | img_mgmt_state |
Global state for upload in progress. More... | |
struct | img_mgmt_upload_action |
Describes what to do during processing of an upload request. More... | |
Macros | |
#define | IMG_MGMT_DATA_SHA_LEN 32 /* SHA256 */ |
#define | IMG_MGMT_STATE_F_PENDING 0x01 |
Image state flags. | |
#define | IMG_MGMT_STATE_F_CONFIRMED 0x02 |
#define | IMG_MGMT_STATE_F_ACTIVE 0x04 |
#define | IMG_MGMT_STATE_F_PERMANENT 0x08 |
#define | IMG_MGMT_VER_MAX_STR_LEN (sizeof("255.255.65535.4294967295")) |
#define | IMG_MGMT_SWAP_TYPE_NONE 0 |
Swap Types for image management state machine. | |
#define | IMG_MGMT_SWAP_TYPE_TEST 1 |
#define | IMG_MGMT_SWAP_TYPE_PERM 2 |
#define | IMG_MGMT_SWAP_TYPE_REVERT 3 |
#define | IMG_MGMT_SWAP_TYPE_UNKNOWN 255 |
#define | IMG_MGMT_ID_STATE 0 |
Command IDs for image management group. | |
#define | IMG_MGMT_ID_UPLOAD 1 |
#define | IMG_MGMT_ID_FILE 2 |
#define | IMG_MGMT_ID_CORELIST 3 |
#define | IMG_MGMT_ID_CORELOAD 4 |
#define | IMG_MGMT_ID_ERASE 5 |
#define | IMG_MGMT_ID_SLOT_INFO 6 |
#define | IMG_MGMT_UPLOAD_ACTION_SET_RC_RSN(action, rsn) |
#define | IMG_MGMT_UPLOAD_ACTION_RC_RSN(action) NULL |
Functions | |
int | img_mgmt_read_info (int image_slot, struct image_version *ver, uint8_t *hash, uint32_t *flags) |
int | img_mgmt_my_version (struct image_version *ver) |
Get the image version of the currently running application. | |
int | img_mgmt_ver_str (const struct image_version *ver, char *dst) |
Format version string from struct image_version. | |
int | img_mgmt_active_slot (int image) |
Get active, running application slot number for an image. | |
int | img_mgmt_active_image (void) |
Get active image number. | |
int | img_mgmt_slot_in_use (int slot) |
Check if the image slot is in use. | |
int | img_mgmt_state_any_pending (void) |
Check if any slot is in MCUboot pending state. | |
uint8_t | img_mgmt_state_flags (int query_slot) |
Returns state flags set to slot. | |
int | img_mgmt_state_set_pending (int slot, int permanent) |
Sets the pending flag for the specified image slot. | |
int | img_mgmt_state_confirm (void) |
Confirms the current image state. | |
int | img_mgmt_vercmp (const struct image_version *a, const struct image_version *b) |
Compares two image version numbers in a semver-compatible way. | |
Variables | |
int | boot_current_slot |
struct img_mgmt_state | g_img_mgmt_state |