| /* |
| * Copyright (c) 2023 Nordic Semiconductor ASA |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| #ifndef H_MCUMGR_EXAMPLE_MGMT_CALLBACKS_ |
| #define H_MCUMGR_EXAMPLE_MGMT_CALLBACKS_ |
| #include <stdint.h> |
| #include <zephyr/mgmt/mcumgr/mgmt/callbacks.h> |
| |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| /* This is the event ID for the example group */ |
| #define MGMT_EVT_GRP_EXAMPLE MGMT_EVT_GRP_USER_CUSTOM_START |
| |
| /* MGMT event opcodes for example management group */ |
| enum example_mgmt_group_events { |
| /* Callback when the other command is received, data is example_mgmt_other_data */ |
| MGMT_EVT_OP_EXAMPLE_OTHER = MGMT_DEF_EVT_OP_ID(MGMT_EVT_GRP_EXAMPLE, 0), |
| |
| /* Used to enable all smp_group events */ |
| MGMT_EVT_OP_EXAMPLE_MGMT_ALL = MGMT_DEF_EVT_OP_ALL(MGMT_EVT_GRP_EXAMPLE), |
| }; |
| |
| /* Structure provided in the #MGMT_EVT_OP_EXAMPLE_OTHER notification callback */ |
| struct example_mgmt_other_data { |
| /* Contains the user supplied value */ |
| uint32_t user_value; |
| }; |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| #endif |