|
Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
|
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_VER_MAX_STR_LEN (sizeof("255.255.65535.4294967295")) |
| #define | IMG_MGMT_UPLOAD_ACTION_SET_RC_RSN(action, rsn) |
| #define | IMG_MGMT_UPLOAD_ACTION_RC_RSN(action) |
Image state flags | |
| #define | IMG_MGMT_STATE_F_PENDING 0x01 |
| Image is set for next swap. | |
| #define | IMG_MGMT_STATE_F_CONFIRMED 0x02 |
| Image has been confirmed. | |
| #define | IMG_MGMT_STATE_F_ACTIVE 0x04 |
| Image is currently active. | |
| #define | IMG_MGMT_STATE_F_PERMANENT 0x08 |
| Image is to stay in primary slot after the next boot. | |
Swap Types for image management state machine | |
| #define | IMG_MGMT_SWAP_TYPE_NONE 0 |
| No swap. | |
| #define | IMG_MGMT_SWAP_TYPE_TEST 1 |
| Test swap. | |
| #define | IMG_MGMT_SWAP_TYPE_PERM 2 |
| Permanent swap. | |
| #define | IMG_MGMT_SWAP_TYPE_REVERT 3 |
| Revert swap. | |
| #define | IMG_MGMT_SWAP_TYPE_UNKNOWN 255 |
| Unknown swap. | |
Command IDs for image management group. | |
| #define | IMG_MGMT_ID_STATE 0 |
| State of images. | |
| #define | IMG_MGMT_ID_UPLOAD 1 |
| Image upload. | |
| #define | IMG_MGMT_ID_FILE 2 |
| File. | |
| #define | IMG_MGMT_ID_CORELIST 3 |
| Corelist. | |
| #define | IMG_MGMT_ID_CORELOAD 4 |
| Coreload. | |
| #define | IMG_MGMT_ID_ERASE 5 |
| Image erase. | |
| #define | IMG_MGMT_ID_SLOT_INFO 6 |
| Slot info. | |
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 |