Go to the source code of this file.
◆ flash_img_buffered_write()
Process input buffers to be written to the image slot 1. flash memory in single blocks. Will store remainder between calls.
A final call to this function with flush set to true will write out the remaining block buffer to flash. Since flash is written to in blocks, the contents of flash from the last byte written up to the next multiple of CONFIG_IMG_BLOCK_BUF_SIZE is padded with 0xff.
- Parameters
-
ctx | context |
data | data to write |
len | Number of bytes to write |
flush | when true this forces any buffered data to be written to flash |
- Returns
- 0 on success, negative errno code on fail
◆ flash_img_bytes_written()
Read number of bytes of the image written to the flash.
- Parameters
-
- Returns
- Number of bytes written to the image flash.
◆ flash_img_check()
Verify flash memory length bytes integrity from a flash area. The start point is indicated by an offset value.
The function is enabled via CONFIG_IMG_ENABLE_IMAGE_CHECK Kconfig options.
- Parameters
-
[in] | ctx | context. |
[in] | fic | flash img check data. |
[in] | area_id | flash area id of partition where the image should be verified. |
- Returns
- 0 on success, negative errno code on fail
◆ flash_img_init()
Initialize context needed for writing the image to the flash.
- Parameters
-
ctx | context to be initialized |
- Returns
- 0 on success, negative errno code on fail
◆ flash_img_init_id()
Initialize context needed for writing the image to the flash.
- Parameters
-
ctx | context to be initialized |
area_id | flash area id of partition where the image should be written |
- Returns
- 0 on success, negative errno code on fail