/*
 * 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 <kernel.h>

#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_ */

/*
 * 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 <kernel.h>

#ifdef __cplusplus
extern "C" {
#endif

/* The file contains definitions of Zephyr specific mgmt commands */

#define ZEPHYR_MGMT_GRP_BASE		MGMT_GROUP_ID_PERUSER

/* 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_ */

--- 
+++ 
@@ -12,9 +12,10 @@
 extern "C" {
 #endif
 
-/* The file contains definitions of Zephyr specific mgmt commands */
-
-#define ZEPHYR_MGMT_GRP_BASE		MGMT_GROUP_ID_PERUSER
+/* 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
subsys/mgmt/mcumgr: Fix collision with user defined groups

The commit moves definition of Zephyr specific mcumgr basic group to
PERUSER - 1.  This has been done to avoid collision with application
specific groups, defined by users.

Signed-off-by: Dominik Ermel <1a1d45a9cc0c98a37f8d0a0d2dbe3cacc0b2344f@nordicsemi.no>
