Skip to content

Commit 2554f04

Browse files
martinjaegercarlescufi
authored andcommitted
doc: services: storage: add flash_img API
Doxygen comments were existing, but they were not rendered anywhere in the docs. The code is located under DFU, but I think it makes sense to document it under storage, next to similar flash-related APIs. Signed-off-by: Martin Jäger <[email protected]>
1 parent 3bd8355 commit 2554f04

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

doc/known-warnings.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Each line should contain the regular expression of a known Sphinx warning
22
# that should be filtered out
33
.*Duplicate C declaration.*\n.*'\.\. c:.*:: dma_config'.*
4+
.*Duplicate C declaration.*\n.*'\.\. c:.*:: flash_img_check'.*
45
.*Duplicate C declaration.*\n.*'\.\. c:.*:: zsock_fd_set'.*
56
.*Duplicate C declaration.*\n.*'\.\. c:.*:: net_if_mcast_monitor'.*
67
.*Duplicate C declaration.*\n.*'\.\. c:.*:: fs_statvfs'.*
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. _flash_img_api:
2+
3+
Flash Image
4+
###########
5+
6+
The flash image API as part of the Device Firmware Upgrade (DFU) subsystem
7+
provides an abstraction on top of Flash Stream to simplify writing firmware
8+
image chunks to flash.
9+
10+
API Reference
11+
*************
12+
13+
.. doxygengroup:: flash_img_api

doc/services/storage/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ Storage
99
nvs/nvs.rst
1010
disk/access.rst
1111
flash_map/flash_map.rst
12+
flash_img/flash_img.rst
1213
fcb/fcb.rst
1314
stream/stream_flash.rst

include/zephyr/dfu/flash_img.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,25 @@
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77

8+
/**
9+
* @file
10+
* @brief Flash image header file
11+
*
12+
* This header file declares prototypes for the flash image APIs used for DFU.
13+
*/
14+
815
#ifndef ZEPHYR_INCLUDE_DFU_FLASH_IMG_H_
916
#define ZEPHYR_INCLUDE_DFU_FLASH_IMG_H_
1017

1118
#include <zephyr/storage/stream_flash.h>
1219

20+
/**
21+
* @brief Abstraction layer to write firmware images to flash
22+
*
23+
* @defgroup flash_img_api Flash image API
24+
* @{
25+
*/
26+
1327
#ifdef __cplusplus
1428
extern "C" {
1529
#endif
@@ -100,4 +114,8 @@ int flash_img_check(struct flash_img_context *ctx,
100114
}
101115
#endif
102116

117+
/**
118+
* @}
119+
*/
120+
103121
#endif /* ZEPHYR_INCLUDE_DFU_FLASH_IMG_H_ */

0 commit comments

Comments
 (0)