diff --git a/include/zephyr/mgmt/mcumgr/grp/zephyr/zephyr_basic.h b/include/zephyr/mgmt/mcumgr/grp/zephyr/zephyr_basic.h new file mode 100644 index 00000000000..baf6e8c071c --- /dev/null +++ b/include/zephyr/mgmt/mcumgr/grp/zephyr/zephyr_basic.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ +#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_ZEPHYR_BASIC_H_ +#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_ZEPHYR_BASIC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Command IDs for zephyr basic management group. + */ +#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0 /* Command to erase storage partition */ + +#ifdef __cplusplus +} +#endif + +#endif /* ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_ZEPHYR_BASIC_H_ */ diff --git a/include/zephyr/mgmt/mcumgr/grp/zephyr/zephyr_groups.h b/include/zephyr/mgmt/mcumgr/grp/zephyr/zephyr_groups.h deleted file mode 100644 index a1760cdddfd..00000000000 --- a/include/zephyr/mgmt/mcumgr/grp/zephyr/zephyr_groups.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2021 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: Apache-2.0 - */ -#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ -#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* The file contains definitions of Zephyr specific mgmt commands. The group numbers decrease - * from PERUSER to avoid collision with user defined groups. - */ -#define ZEPHYR_MGMT_GRP_BASE (MGMT_GROUP_ID_PERUSER - 1) - -/* Basic group */ -#define ZEPHYR_MGMT_GRP_BASIC ZEPHYR_MGMT_GRP_BASE -#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0 /* Command to erase storage partition */ - -#ifdef __cplusplus -} -#endif - -#endif /* ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ */ diff --git a/include/zephyr/mgmt/mcumgr/mgmt/mgmt.h b/include/zephyr/mgmt/mcumgr/mgmt/mgmt.h index bc5b9c89f56..b47a7e7f8df 100644 --- a/include/zephyr/mgmt/mcumgr/mgmt/mgmt.h +++ b/include/zephyr/mgmt/mcumgr/mgmt/mgmt.h @@ -36,6 +36,13 @@ extern "C" { #define MGMT_GROUP_ID_RUN 7 #define MGMT_GROUP_ID_FS 8 #define MGMT_GROUP_ID_SHELL 9 + +/** Zephyr-specific groups decrease from PERUSER to avoid collision with user defined groups. */ +#define ZEPHYR_MGMT_GRP_BASE (MGMT_GROUP_ID_PERUSER - 1) + +/** Basic group */ +#define ZEPHYR_MGMT_GRP_BASIC ZEPHYR_MGMT_GRP_BASE + #define MGMT_GROUP_ID_PERUSER 64 /** diff --git a/subsys/mgmt/mcumgr/grp/zephyr_basic/src/basic_mgmt.c b/subsys/mgmt/mcumgr/grp/zephyr_basic/src/basic_mgmt.c index 9fbd616663c..bfd64c89249 100644 --- a/subsys/mgmt/mcumgr/grp/zephyr_basic/src/basic_mgmt.c +++ b/subsys/mgmt/mcumgr/grp/zephyr_basic/src/basic_mgmt.c @@ -10,7 +10,7 @@ #include #include -#include +#include LOG_MODULE_REGISTER(mcumgr_zephyr_grp);