flash_lock

Execute lock in the internal flash.

int32_t flash_lock(
    struct flash_descriptor * flash,
    const uint32_t dst_addr,
    const uint32_t page_nums
)

Parameters

flash

Type: struct flash_descriptor Struct *

Pointer to the HAL FLASH instance.

dst_addr

Type: const uint32_t

Destination bytes address aligned with page start to be locked

page_nums

Type: const uint32_t

Number of pages to be locked

Returns

Type: int32_t

Real locked numbers of pages.