Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions subsys/mgmt/mcumgr/grp/os_mgmt/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,17 @@ config MCUMGR_GRP_OS_DATETIME_HOOK
config MCUMGR_GRP_OS_MCUMGR_PARAMS
bool "MCUMGR Parameters retrieval command"

config MCUMGR_GRP_OS_MCUMGR_PARAMS_ROLE
bool "MCUMGR Parameter Role in response"
depends on MCUMGR_GRP_OS_MCUMGR_PARAMS

config MCUMGR_GRP_OS_MCUMGR_PARAMS_ROLE_VALUE
int "MCUMGR Parameter Role value"
default 0
depends on MCUMGR_GRP_OS_MCUMGR_PARAMS_ROLE
helps
Value for `inst_role` field in response to MCUmgr Parameters request.

config MCUMGR_GRP_OS_INFO
bool "Support for info command"
help
Expand Down
4 changes: 4 additions & 0 deletions subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,10 @@
zcbor_uint32_put(zse, CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE) &&
zcbor_tstr_put_lit(zse, "buf_count") &&
zcbor_uint32_put(zse, CONFIG_MCUMGR_TRANSPORT_NETBUF_COUNT);
#ifdef CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS_ROLE
zcbor_tstr_put_lit(zse, "inst_role") &&
zcbor_uint32_put(zse, CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS_ROLE_VALUE);
#endif

Check notice on line 478 in subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c:478 - zcbor_tstr_put_lit(zse, "inst_role") && - zcbor_uint32_put(zse, CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS_ROLE_VALUE); + zcbor_tstr_put_lit(zse, "inst_role") && + zcbor_uint32_put(zse, CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS_ROLE_VALUE);

Check notice on line 478 in subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c:478 - zcbor_tstr_put_lit(zse, "inst_role") && - zcbor_uint32_put(zse, CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS_ROLE_VALUE); + zcbor_tstr_put_lit(zse, "inst_role") && + zcbor_uint32_put(zse, CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS_ROLE_VALUE);

return ok ? MGMT_ERR_EOK : MGMT_ERR_EMSGSIZE;
}
Expand Down
Loading