Skip to content

Commit fbb88f0

Browse files
tomchyde-nordic
authored andcommitted
bootutil: Add missing docs
Add missing API docs for the following functions: - boot_get_loader_state() - boot_get_image_max_sizes() - image_max_size *boot_get_max_app_size() Restrict visibility of the app_size* APIs, based on the configuration. Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
1 parent f2d3f00 commit fbb88f0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

boot/bootutil/include/bootutil/bootutil.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,36 @@ fih_ret boot_go_for_image_id(struct boot_rsp *rsp, uint32_t image_id);
8888

8989
void boot_state_clear(struct boot_loader_state *state);
9090
fih_ret context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp);
91+
92+
/**
93+
* Returns a pointer to the boot loader state structure.
94+
*
95+
* @return Pointer to the boot loader state structure.
96+
*/
9197
struct boot_loader_state *boot_get_loader_state(void);
98+
99+
#if defined(MCUBOOT_SERIAL_IMG_GRP_SLOT_INFO) || defined(MCUBOOT_DATA_SHARING)
100+
/**
101+
* Returns pointer to array of image maximum sizes.
102+
*
103+
* @note This function provides a RAW access to the structure. The sizes may not be
104+
* calculated yet. Use boot_get_max_app_size() to ensure the sizes are calculated.
105+
*
106+
* @return Pointer to array of image maximum sizes.
107+
*/
92108
struct image_max_size *boot_get_image_max_sizes(void);
109+
110+
/**
111+
* Fetches the maximum allowed size of all application images.
112+
*
113+
* @note In contrast to boot_get_image_max_sizes(), this function will fetch the sizes
114+
* if they are not yet calculated.
115+
*
116+
* @return A pointer to the structure containing the maximum sizes of images.
117+
*/
93118
const struct image_max_size *boot_get_max_app_size(void);
119+
#endif /* MCUBOOT_SERIAL_IMG_GRP_SLOT_INFO || MCUBOOT_DATA_SHARING */
120+
94121
void boot_fetch_slot_state_sizes(void);
95122
uint32_t boot_get_state_secondary_offset(struct boot_loader_state *state,
96123
const struct flash_area *fap);

0 commit comments

Comments
 (0)