Skip to content

Commit 5a5fd7c

Browse files
kartbenjhedberg
authored andcommitted
doc: mcumgr: fix mixed up occurrences of :c:enum: and :c:enumerator:
While Breathe seems to not care and creates hyperlinks either way, the proper role to mention a C enumerator is :c:enumerator:. :c:enum: is to be used to refer to the enum itself. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 6289332 commit 5a5fd7c

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

doc/services/device_mgmt/mcumgr_callbacks.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ the file should be allowed or not, note that this requires that
192192
:kconfig:option:`CONFIG_MCUMGR_GRP_FS_FILE_ACCESS_HOOK` be enabled to receive
193193
this callback.
194194
Two types of errors can be returned, the ``rc`` parameter can be set to an
195-
:c:enumerator:`mcumgr_err_t` error code and :c:enumerator:`MGMT_CB_ERROR_RC`
195+
:c:enum:`mcumgr_err_t` error code and :c:enumerator:`MGMT_CB_ERROR_RC`
196196
can be returned, or a group error code (introduced with version 2 of the MCUmgr
197197
protocol) can be set by setting the ``group`` value to the group and ``rc``
198198
value to the group error code and returning :c:enumerator:`MGMT_CB_ERROR_ERR`.
@@ -330,4 +330,3 @@ API Reference
330330
*************
331331

332332
.. doxygengroup:: mcumgr_callback_api
333-
:inner:

doc/services/device_mgmt/mcumgr_handlers.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ responses (which have unique error codes per group as opposed to the legacy SMP
5252
responses that return a :c:enum:`mcumgr_err_t` - there should always be an OK error code with the
5353
value 0 and an unknown error code with the value 1. The above example then adds an error code of
5454
``not wanted`` with value 2. In addition, the group ID is set to be
55-
:c:enum:`MGMT_GROUP_ID_PERUSER`, which is the start group ID for user-defined groups, note that
56-
group IDs need to be unique so other custom groups should use different values, a central index
55+
:c:enumerator:`MGMT_GROUP_ID_PERUSER`, which is the start group ID for user-defined groups, note
56+
that group IDs need to be unique so other custom groups should use different values, a central index
5757
header file (as upstream Zephyr has) can be used to distribute group IDs more easily.
5858

5959
Initial header <grp_name>_mgmt_callbacks.h
@@ -70,7 +70,7 @@ file would look similar to:
7070
This sets up a single event which application (or module) code can register for to receive a
7171
callback when the function handler is executed, which allows the flow of the handler to be
7272
changed (i.e. to return an error instead of continuing). The event group ID is set to
73-
:c:enum:`MGMT_EVT_GRP_USER_CUSTOM_START`, which is the start event ID for user-defined groups,
73+
:c:enumerator:`MGMT_EVT_GRP_USER_CUSTOM_START`, which is the start event ID for user-defined groups,
7474
note that event IDs need to be unique so other custom groups should use different values, a
7575
central index header file (as upstream Zephyr has) can be used to distribute event IDs more
7676
easily.

doc/services/device_mgmt/smp_groups/smp_group_0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ System reset request header fields:
563563
+--------+--------------+----------------+
564564

565565
Normally the command sends an empty CBOR map as data, but if a previous reset
566-
attempt has responded with "rc" equal to :c:enum:`MGMT_ERR_EBUSY` then the
566+
attempt has responded with "rc" equal to :c:enumerator:`MGMT_ERR_EBUSY` then the
567567
following map may be sent to force a reset:
568568

569569
.. code-block:: none

doc/services/device_mgmt/smp_groups/smp_group_1.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ where:
204204
| | using SMP version 1 or for SMP errors when using SMP version 2. |
205205
+------------------+-------------------------------------------------------------------------+
206206
| "rsn" | optional string that clarifies reason for an error; specifically useful |
207-
| | when ``rc`` is :c:enum:`MGMT_ERR_EUNKNOWN`. |
207+
| | when ``rc`` is :c:enumerator:`MGMT_ERR_EUNKNOWN`. |
208208
+------------------+-------------------------------------------------------------------------+
209209

210210
.. note::
@@ -407,7 +407,7 @@ where:
407407
| | using SMP version 1 or for SMP errors when using SMP version 2. |
408408
+------------------+-------------------------------------------------------------------------+
409409
| "rsn" | optional string that clarifies reason for an error; specifically useful |
410-
| | when ``rc`` is :c:enum:`MGMT_ERR_EUNKNOWN`. |
410+
| | when ``rc`` is :c:enumerator:`MGMT_ERR_EUNKNOWN`. |
411411
+------------------+-------------------------------------------------------------------------+
412412

413413
The "off" field is only included in responses to successfully processed requests;
@@ -509,10 +509,10 @@ where:
509509
| | using SMP version 1 or for SMP errors when using SMP version 2. |
510510
+------------------+-------------------------------------------------------------------------+
511511
| "rsn" | optional string that clarifies reason for an error; specifically useful |
512-
| | when ``rc`` is :c:enum:`MGMT_ERR_EUNKNOWN`. |
512+
| | when ``rc`` is :c:enumerator:`MGMT_ERR_EUNKNOWN`. |
513513
+------------------+-------------------------------------------------------------------------+
514514

515515
.. note::
516516
Response from Zephyr running device may have "rc" value of
517-
:c:enum:`MGMT_ERR_EBADSTATE`, which means that the secondary
517+
:c:enumerator:`MGMT_ERR_EBADSTATE`, which means that the secondary
518518
image has been marked for next boot already and may not be erased.

doc/services/device_mgmt/smp_groups/smp_group_3.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -542,5 +542,5 @@ There is a settings access MCUmgr callback available (see :ref:`mcumgr_callbacks
542542
callbacks) which allows for applications/modules to know when settings management commands are
543543
used and, optionally, block access (for example through the use of a security mechanism). This
544544
callback can be enabled with :kconfig:option:`CONFIG_MCUMGR_GRP_SETTINGS_ACCESS_HOOK`, registered
545-
with the event :c:enum:`MGMT_EVT_OP_SETTINGS_MGMT_ACCESS`, whereby the supplied callback data is
546-
:c:struct:`settings_mgmt_access`.
545+
with the event :c:enumerator:`MGMT_EVT_OP_SETTINGS_MGMT_ACCESS`, whereby the supplied callback data
546+
is :c:struct:`settings_mgmt_access`.

doc/services/device_mgmt/smp_groups/smp_group_8.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ requests or even be removed.
4747
However, if the Kconfig option
4848
:kconfig:option:`CONFIG_MCUMGR_GRP_FS_FILE_ACCESS_HOOK` is enabled, then an
4949
application can register a callback handler for
50-
:c:enum:`MGMT_EVT_OP_FS_MGMT_FILE_ACCESS` (see
50+
:c:enumerator:`MGMT_EVT_OP_FS_MGMT_FILE_ACCESS` (see
5151
:ref:`MCUmgr callbacks <mcumgr_callbacks>`), which allows for allowing or
5252
declining access to reading/writing a particular file, or for rewriting the
5353
path supplied by the client.
@@ -185,7 +185,7 @@ change between requests or even be removed.
185185
However, if the Kconfig option
186186
:kconfig:option:`CONFIG_MCUMGR_GRP_FS_FILE_ACCESS_HOOK` is enabled, then an
187187
application can register a callback handler for
188-
:c:enum:`MGMT_EVT_OP_FS_MGMT_FILE_ACCESS` (see
188+
:c:enumerator:`MGMT_EVT_OP_FS_MGMT_FILE_ACCESS` (see
189189
:ref:`MCUmgr callbacks <mcumgr_callbacks>`), which allows for allowing or
190190
declining access to reading/writing a particular file, or for rewriting the
191191
path supplied by the client.

0 commit comments

Comments
 (0)