Skip to content

Commit 071b571

Browse files
committed
include: mgmt: mcumgr: doc: massive doxygen makeover
This cleans up the doxygen documentation for the MCUmgr subsystem (consolidated the doxygen groups, added some missing docs, added proper @name'd sections where appropriate, etc). Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 917e518 commit 071b571

27 files changed

+312
-130
lines changed

doc/_doxygen/groups.dox

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
@brief MCUmgr
1414
@defgroup mcumgr MCUmgr
1515
@{
16+
@defgroup mcumgr_transport Transport layers
17+
@{
18+
@}
1619
@}
1720

1821
@}

include/zephyr/mgmt/mcumgr/grp/enum_mgmt/enum_mgmt.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#define H_ENUM_MGMT_
99

1010
/**
11-
* @brief MCUmgr enum_mgmt API
12-
* @defgroup mcumgr_enum_mgmt MCUmgr enum_mgmt API
13-
* @ingroup mcumgr
11+
* @brief MCUmgr Enumeration Management API
12+
* @defgroup mcumgr_enum_mgmt Enumeration Management
13+
* @ingroup mcumgr_mgmt_api
1414
* @{
1515
*/
1616

@@ -19,12 +19,16 @@ extern "C" {
1919
#endif
2020

2121
/**
22-
* Command IDs for enumeration management group.
22+
* @name Command IDs for enumeration management group.
23+
* @{
24+
*/
25+
#define ENUM_MGMT_ID_COUNT 0 /**< Count of supported groups */
26+
#define ENUM_MGMT_ID_LIST 1 /**< List supported groups */
27+
#define ENUM_MGMT_ID_SINGLE 2 /**< Fetch single group ID */
28+
#define ENUM_MGMT_ID_DETAILS 3 /**< Details on supported groups */
29+
/**
30+
* @}
2331
*/
24-
#define ENUM_MGMT_ID_COUNT 0
25-
#define ENUM_MGMT_ID_LIST 1
26-
#define ENUM_MGMT_ID_SINGLE 2
27-
#define ENUM_MGMT_ID_DETAILS 3
2832

2933
/**
3034
* Command result codes for enumeration management group.

include/zephyr/mgmt/mcumgr/grp/enum_mgmt/enum_mgmt_callbacks.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ extern "C" {
1212
#endif
1313

1414
/**
15-
* @brief MCUmgr enum_mgmt callback API
16-
* @defgroup mcumgr_callback_api_enum_mgmt MCUmgr enum_mgmt callback API
15+
* @brief MCUmgr Enumeration Management Callbacks API
16+
* @defgroup mcumgr_callback_api_enum_mgmt Enumeration Management Callbacks
17+
* @ingroup mcumgr_enum_mgmt
1718
* @ingroup mcumgr_callback_api
1819
* @{
1920
*/

include/zephyr/mgmt/mcumgr/grp/fs_mgmt/fs_mgmt.h

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,29 @@
99
#ifndef H_FS_MGMT_
1010
#define H_FS_MGMT_
1111

12+
/**
13+
* @brief MCUmgr File System Management API
14+
* @defgroup mcumgr_fs_mgmt File System Management
15+
* @ingroup mcumgr_mgmt_api
16+
* @{
17+
*/
18+
1219
#ifdef __cplusplus
1320
extern "C" {
1421
#endif
1522

1623
/**
17-
* Command IDs for file system management group.
24+
* @name Command IDs for File System Management group.
25+
* @{
26+
*/
27+
#define FS_MGMT_ID_FILE 0 /**< File download/upload */
28+
#define FS_MGMT_ID_STAT 1 /**< File status */
29+
#define FS_MGMT_ID_HASH_CHECKSUM 2 /**< File hash/checksum */
30+
#define FS_MGMT_ID_SUPPORTED_HASH_CHECKSUM 3 /**< Supported file hash/checksum types */
31+
#define FS_MGMT_ID_OPENED_FILE 4 /**< File close */
32+
/**
33+
* @}
1834
*/
19-
#define FS_MGMT_ID_FILE 0
20-
#define FS_MGMT_ID_STAT 1
21-
#define FS_MGMT_ID_HASH_CHECKSUM 2
22-
#define FS_MGMT_ID_SUPPORTED_HASH_CHECKSUM 3
23-
#define FS_MGMT_ID_OPENED_FILE 4
2435

2536
/**
2637
* Command result codes for file system management group.
@@ -88,4 +99,8 @@ enum fs_mgmt_err_code_t {
8899
}
89100
#endif
90101

102+
/**
103+
* @}
104+
*/
105+
91106
#endif

include/zephyr/mgmt/mcumgr/grp/fs_mgmt/fs_mgmt_callbacks.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ extern "C" {
1313
#endif
1414

1515
/**
16-
* @brief MCUmgr fs_mgmt callback API
17-
* @defgroup mcumgr_callback_api_fs_mgmt MCUmgr fs_mgmt callback API
16+
* @brief MCUmgr File System Management Callbacks API
17+
* @defgroup mcumgr_callback_api_fs_mgmt File System Management Callbacks
18+
* @ingroup mcumgr_fs_mgmt
1819
* @ingroup mcumgr_callback_api
1920
* @{
2021
*/

include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
#endif
1919

2020
/**
21-
* @brief MCUmgr img_mgmt API
22-
* @defgroup mcumgr_img_mgmt MCUmgr img_mgmt API
23-
* @ingroup mcumgr
21+
* @brief MCUmgr Image Management API
22+
* @defgroup mcumgr_img_mgmt Image Management
23+
* @ingroup mcumgr_mgmt_api
2424
* @{
2525
*/
2626

@@ -31,35 +31,45 @@ extern "C" {
3131
#define IMG_MGMT_DATA_SHA_LEN 32 /* SHA256 */
3232

3333
/**
34-
* Image state flags
34+
* @name Image state flags
35+
* @{
3536
*/
37+
/** Image is set for next swap */
3638
#define IMG_MGMT_STATE_F_PENDING 0x01
39+
/** Image has been confirmed. */
3740
#define IMG_MGMT_STATE_F_CONFIRMED 0x02
41+
/** Image is currently active. */
3842
#define IMG_MGMT_STATE_F_ACTIVE 0x04
43+
/** Image is to stay in primary slot after the next boot. */
3944
#define IMG_MGMT_STATE_F_PERMANENT 0x08
45+
/** @} */
4046

4147
/* 255.255.65535.4294967295\0 */
4248
#define IMG_MGMT_VER_MAX_STR_LEN (sizeof("255.255.65535.4294967295"))
4349

4450
/**
45-
* Swap Types for image management state machine
51+
* @name Swap Types for image management state machine
52+
* @{
4653
*/
47-
#define IMG_MGMT_SWAP_TYPE_NONE 0
48-
#define IMG_MGMT_SWAP_TYPE_TEST 1
49-
#define IMG_MGMT_SWAP_TYPE_PERM 2
50-
#define IMG_MGMT_SWAP_TYPE_REVERT 3
51-
#define IMG_MGMT_SWAP_TYPE_UNKNOWN 255
54+
#define IMG_MGMT_SWAP_TYPE_NONE 0 /**< No swap */
55+
#define IMG_MGMT_SWAP_TYPE_TEST 1 /**< Test swap */
56+
#define IMG_MGMT_SWAP_TYPE_PERM 2 /**< Permanent swap */
57+
#define IMG_MGMT_SWAP_TYPE_REVERT 3 /**< Revert swap */
58+
#define IMG_MGMT_SWAP_TYPE_UNKNOWN 255 /**< Unknown swap */
59+
/** @} */
5260

5361
/**
54-
* Command IDs for image management group.
62+
* @name Command IDs for image management group.
63+
* @{
5564
*/
56-
#define IMG_MGMT_ID_STATE 0
57-
#define IMG_MGMT_ID_UPLOAD 1
58-
#define IMG_MGMT_ID_FILE 2
59-
#define IMG_MGMT_ID_CORELIST 3
60-
#define IMG_MGMT_ID_CORELOAD 4
61-
#define IMG_MGMT_ID_ERASE 5
62-
#define IMG_MGMT_ID_SLOT_INFO 6
65+
#define IMG_MGMT_ID_STATE 0 /**< State of images */
66+
#define IMG_MGMT_ID_UPLOAD 1 /**< Image upload */
67+
#define IMG_MGMT_ID_FILE 2 /**< File */
68+
#define IMG_MGMT_ID_CORELIST 3 /**< Corelist */
69+
#define IMG_MGMT_ID_CORELOAD 4 /**< Coreload */
70+
#define IMG_MGMT_ID_ERASE 5 /**< Image erase */
71+
#define IMG_MGMT_ID_SLOT_INFO 6 /**< Slot info */
72+
/** @} */
6373

6474
/**
6575
* Command result codes for image management group.

include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt_callbacks.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ struct img_mgmt_upload_action;
2121
struct img_mgmt_upload_req;
2222

2323
/**
24-
* @brief MCUmgr img_mgmt callback API
25-
* @defgroup mcumgr_callback_api_img_mgmt MCUmgr img_mgmt callback API
24+
* @brief MCUmgr Image Management Callbacks API
25+
* @defgroup mcumgr_callback_api_img_mgmt Image Management Callbacks
26+
* @ingroup mcumgr_img_mgmt
2627
* @ingroup mcumgr_callback_api
2728
* @{
2829
*/

include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt_client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
/**
1616
* @brief MCUmgr Image management client API
17-
* @defgroup mcumgr_img_mgmt_client MCUmgr img_mgmt_client API
18-
* @ingroup mcumgr
17+
* @defgroup mcumgr_img_mgmt_client Image Management Client
18+
* @ingroup mcumgr_img_mgmt
1919
* @{
2020
*/
2121

include/zephyr/mgmt/mcumgr/grp/os_mgmt/os_mgmt.h

Lines changed: 51 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,33 @@
99
#ifndef H_OS_MGMT_
1010
#define H_OS_MGMT_
1111

12+
/**
13+
* @brief MCUmgr OS Management API
14+
* @defgroup mcumgr_os_mgmt OS Management
15+
* @ingroup mcumgr_mgmt_api
16+
* @{
17+
*/
18+
1219
#ifdef __cplusplus
1320
extern "C" {
1421
#endif
1522

1623
/**
17-
* Command IDs for OS management group.
24+
* @name Command IDs for OS Management group.
25+
* @{
26+
*/
27+
#define OS_MGMT_ID_ECHO 0 /**< Echo */
28+
#define OS_MGMT_ID_CONS_ECHO_CTRL 1 /**< Console/terminal echo control */
29+
#define OS_MGMT_ID_TASKSTAT 2 /**< Task statistics */
30+
#define OS_MGMT_ID_MPSTAT 3 /**< Memory pool statistics */
31+
#define OS_MGMT_ID_DATETIME_STR 4 /**< Date-time string */
32+
#define OS_MGMT_ID_RESET 5 /**< System reset */
33+
#define OS_MGMT_ID_MCUMGR_PARAMS 6 /**< MCUMgr parameters */
34+
#define OS_MGMT_ID_INFO 7 /**< OS/Application information */
35+
#define OS_MGMT_ID_BOOTLOADER_INFO 8 /**< Bootloader information */
36+
/**
37+
* @}
1838
*/
19-
#define OS_MGMT_ID_ECHO 0
20-
#define OS_MGMT_ID_CONS_ECHO_CTRL 1
21-
#define OS_MGMT_ID_TASKSTAT 2
22-
#define OS_MGMT_ID_MPSTAT 3
23-
#define OS_MGMT_ID_DATETIME_STR 4
24-
#define OS_MGMT_ID_RESET 5
25-
#define OS_MGMT_ID_MCUMGR_PARAMS 6
26-
#define OS_MGMT_ID_INFO 7
27-
#define OS_MGMT_ID_BOOTLOADER_INFO 8
2839

2940
/**
3041
* Command result codes for OS management group.
@@ -52,57 +63,60 @@ enum os_mgmt_err_code_t {
5263
OS_MGMT_ERR_QUERY_RESPONSE_VALUE_NOT_VALID,
5364
};
5465

55-
/* Bitmask values used by the os info command handler. Note that the width of this variable is
66+
/**
67+
* OS/Application information formats.
68+
*
69+
* Bitmask values used by the os info command handler. Note that the width of this variable is
5670
* 32-bits, allowing 32 flags, custom user-level implementations should start at
57-
* OS_MGMT_INFO_FORMAT_USER_CUSTOM_START and reference that directly as additional format
71+
* #OS_MGMT_INFO_FORMAT_USER_CUSTOM_START and reference that directly as additional format
5872
* specifiers might be added to this list in the future.
5973
*/
6074
enum os_mgmt_info_formats {
61-
OS_MGMT_INFO_FORMAT_KERNEL_NAME = BIT(0),
62-
OS_MGMT_INFO_FORMAT_NODE_NAME = BIT(1),
63-
OS_MGMT_INFO_FORMAT_KERNEL_RELEASE = BIT(2),
64-
OS_MGMT_INFO_FORMAT_KERNEL_VERSION = BIT(3),
65-
OS_MGMT_INFO_FORMAT_BUILD_DATE_TIME = BIT(4),
66-
OS_MGMT_INFO_FORMAT_MACHINE = BIT(5),
67-
OS_MGMT_INFO_FORMAT_PROCESSOR = BIT(6),
68-
OS_MGMT_INFO_FORMAT_HARDWARE_PLATFORM = BIT(7),
69-
OS_MGMT_INFO_FORMAT_OPERATING_SYSTEM = BIT(8),
70-
71-
OS_MGMT_INFO_FORMAT_USER_CUSTOM_START = BIT(9),
75+
OS_MGMT_INFO_FORMAT_KERNEL_NAME = BIT(0), /**< Kernel name */
76+
OS_MGMT_INFO_FORMAT_NODE_NAME = BIT(1), /**< Node name */
77+
OS_MGMT_INFO_FORMAT_KERNEL_RELEASE = BIT(2), /**< Kernel release */
78+
OS_MGMT_INFO_FORMAT_KERNEL_VERSION = BIT(3), /**< Kernel version */
79+
OS_MGMT_INFO_FORMAT_BUILD_DATE_TIME = BIT(4), /**< Build date and time */
80+
OS_MGMT_INFO_FORMAT_MACHINE = BIT(5), /**< Machine */
81+
OS_MGMT_INFO_FORMAT_PROCESSOR = BIT(6), /**< Processor */
82+
OS_MGMT_INFO_FORMAT_HARDWARE_PLATFORM = BIT(7), /**< Hardware platform */
83+
OS_MGMT_INFO_FORMAT_OPERATING_SYSTEM = BIT(8), /**< Operating system */
84+
85+
OS_MGMT_INFO_FORMAT_USER_CUSTOM_START = BIT(9), /**< Custom user-level start bit */
7286
};
7387

74-
/* Structure provided in the MGMT_EVT_OP_OS_MGMT_INFO_CHECK notification callback */
88+
/* Structure provided in the #MGMT_EVT_OP_OS_MGMT_INFO_CHECK notification callback */
7589
struct os_mgmt_info_check {
76-
/* Input format string from the mcumgr client */
90+
/** Input format string from the mcumgr client */
7791
struct zcbor_string *format;
78-
/* Bitmask of values specifying which outputs should be present */
92+
/** Bitmask of values specifying which outputs should be present */
7993
uint32_t *format_bitmask;
80-
/* Number of valid format characters parsed, must be incremented by 1 for each valid
94+
/** Number of valid format characters parsed, must be incremented by 1 for each valid
8195
* character
8296
*/
8397
uint16_t *valid_formats;
84-
/* Needs to be set to true if the OS name is being provided by external code */
98+
/** Needs to be set to true if the OS name is being provided by external code */
8599
bool *custom_os_name;
86100
};
87101

88102
/* Structure provided in the MGMT_EVT_OP_OS_MGMT_INFO_APPEND notification callback */
89103
struct os_mgmt_info_append {
90-
/* The format bitmask from the processed commands, the bits should be cleared once
104+
/** The format bitmask from the processed commands, the bits should be cleared once
91105
* processed, note that if all_format_specified is specified, the corresponding bits here
92106
* will not be set
93107
*/
94108
uint32_t *format_bitmask;
95-
/* Will be true if the all 'a' specifier was provided */
109+
/** Will be true if the all 'a' specifier was provided */
96110
bool all_format_specified;
97-
/* The output buffer which the responses should be appended to. If prior_output is true, a
111+
/** The output buffer which the responses should be appended to. If prior_output is true, a
98112
* space must be added prior to the output response
99113
*/
100114
uint8_t *output;
101-
/* The current size of the output response in the output buffer, must be updated to be the
115+
/** The current size of the output response in the output buffer, must be updated to be the
102116
* size of the output response after appending data
103117
*/
104118
uint16_t *output_length;
105-
/* The size of the output buffer, including null terminator character, if the output
119+
/** The size of the output buffer, including null terminator character, if the output
106120
* response would exceed this size, the function must abort and return false to return a
107121
* memory error to the client
108122
*/
@@ -115,4 +129,8 @@ struct os_mgmt_info_append {
115129
}
116130
#endif
117131

132+
/**
133+
* @}
134+
*/
135+
118136
#endif /* H_OS_MGMT_ */

include/zephyr/mgmt/mcumgr/grp/os_mgmt/os_mgmt_callbacks.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ extern "C" {
1212
#endif
1313

1414
/**
15-
* @brief MCUmgr os_mgmt callback API
16-
* @defgroup mcumgr_callback_api_os_mgmt MCUmgr os_mgmt callback API
15+
* @brief MCUmgr OS Management Callbacks API
16+
* @defgroup mcumgr_callback_api_os_mgmt OS Management Callbacks
17+
* @ingroup mcumgr_os_mgmt
1718
* @ingroup mcumgr_callback_api
1819
* @{
1920
*/

0 commit comments

Comments
 (0)