Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
flash_img.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 Nordic Semiconductor ASA
3 * Copyright (c) 2017 Linaro Limited
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
15#ifndef ZEPHYR_INCLUDE_DFU_FLASH_IMG_H_
16#define ZEPHYR_INCLUDE_DFU_FLASH_IMG_H_
17
19
28#ifdef __cplusplus
29extern "C" {
30#endif
31
33 uint8_t buf[CONFIG_IMG_BLOCK_BUF_SIZE];
34 const struct flash_area *flash_area;
36};
37
45 const uint8_t *match;
46 size_t clen;
47};
48
58
67
76
95 size_t len, bool flush);
96
111 const struct flash_img_check *fic,
112 uint8_t area_id);
113
114#ifdef __cplusplus
115}
116#endif
117
122#endif /* ZEPHYR_INCLUDE_DFU_FLASH_IMG_H_ */
int flash_img_init_id(struct flash_img_context *ctx, uint8_t area_id)
Initialize context needed for writing the image to the flash.
size_t flash_img_bytes_written(struct flash_img_context *ctx)
Read number of bytes of the image written to the flash.
int flash_img_init(struct flash_img_context *ctx)
Initialize context needed for writing the image to the flash.
int flash_img_buffered_write(struct flash_img_context *ctx, const uint8_t *data, size_t len, bool flush)
Process input buffers to be written to the image slot 1.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Public API for stream writes to flash.
Flash partition.
Definition flash_map.h:59
Structure for verify flash region integrity.
Definition flash_img.h:44
const uint8_t * match
Definition flash_img.h:45
size_t clen
Match vector data.
Definition flash_img.h:46
Definition flash_img.h:32
uint8_t buf[CONFIG_IMG_BLOCK_BUF_SIZE]
Definition flash_img.h:33
struct stream_flash_ctx stream
Definition flash_img.h:35
const struct flash_area * flash_area
Definition flash_img.h:34
Structure for stream flash context.
Definition stream_flash.h:56
static fdata_t data[2]
Definition test_fifo_contexts.c:15