bluetooth: mesh: gatt: Move generic GATT related defines to gatt.h
This moves GATT releated defines that are used by both Mesh Proxy Service and Mesh Provisioning Service implementations to a common header file. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
parent
ab346a1dd0
commit
684c94e469
4 changed files with 21 additions and 14 deletions
19
subsys/bluetooth/mesh/gatt.h
Normal file
19
subsys/bluetooth/mesh/gatt.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define ADV_SLOW_INT \
|
||||
.interval_min = BT_GAP_ADV_SLOW_INT_MIN, \
|
||||
.interval_max = BT_GAP_ADV_SLOW_INT_MAX
|
||||
|
||||
#define ADV_FAST_INT \
|
||||
.interval_min = BT_GAP_ADV_FAST_INT_MIN_2, \
|
||||
.interval_max = BT_GAP_ADV_FAST_INT_MAX_2
|
||||
|
||||
#define BT_DEVICE_NAME (IS_ENABLED(CONFIG_BT_DEVICE_NAME_DYNAMIC) ? \
|
||||
(const uint8_t *)bt_get_name() : \
|
||||
(const uint8_t *)CONFIG_BT_DEVICE_NAME)
|
||||
#define BT_DEVICE_NAME_LEN (IS_ENABLED(CONFIG_BT_DEVICE_NAME_DYNAMIC) ? strlen(bt_get_name()) : \
|
||||
(sizeof(CONFIG_BT_DEVICE_NAME) - 1))
|
|
@ -26,6 +26,7 @@
|
|||
#include "foundation.h"
|
||||
#include "access.h"
|
||||
#include "proxy.h"
|
||||
#include "gatt.h"
|
||||
#include "proxy_msg.h"
|
||||
#include "pb_gatt_srv.h"
|
||||
|
||||
|
|
|
@ -10,20 +10,6 @@
|
|||
#define ADV_OPT_USE_IDENTITY 0
|
||||
#endif
|
||||
|
||||
#define ADV_SLOW_INT \
|
||||
.interval_min = BT_GAP_ADV_SLOW_INT_MIN, \
|
||||
.interval_max = BT_GAP_ADV_SLOW_INT_MAX
|
||||
|
||||
#define ADV_FAST_INT \
|
||||
.interval_min = BT_GAP_ADV_FAST_INT_MIN_2, \
|
||||
.interval_max = BT_GAP_ADV_FAST_INT_MAX_2
|
||||
|
||||
#define BT_DEVICE_NAME (IS_ENABLED(CONFIG_BT_DEVICE_NAME_DYNAMIC) ? \
|
||||
(const uint8_t *)bt_get_name() : \
|
||||
(const uint8_t *)CONFIG_BT_DEVICE_NAME)
|
||||
#define BT_DEVICE_NAME_LEN (IS_ENABLED(CONFIG_BT_DEVICE_NAME_DYNAMIC) ? strlen(bt_get_name()) : \
|
||||
(sizeof(CONFIG_BT_DEVICE_NAME) - 1))
|
||||
|
||||
#define BT_MESH_ID_TYPE_NET 0x00
|
||||
#define BT_MESH_ID_TYPE_NODE 0x01
|
||||
#define BT_MESH_ID_TYPE_PRIV_NET 0x02
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "foundation.h"
|
||||
#include "access.h"
|
||||
#include "proxy.h"
|
||||
#include "gatt.h"
|
||||
#include "proxy_msg.h"
|
||||
#include "crypto.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue