Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
nrf_mesh_config_app.h
Go to the documentation of this file.
1/* Copyright (c) 2010 - 2018, Nordic Semiconductor ASA
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without modification,
5 * are permitted provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * 2. Redistributions in binary form, except as embedded into a Nordic
11 * Semiconductor ASA integrated circuit in a product or a software update for
12 * such product, must reproduce the above copyright notice, this list of
13 * conditions and the following disclaimer in the documentation and/or other
14 * materials provided with the distribution.
15 *
16 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
17 * contributors may be used to endorse or promote products derived from this
18 * software without specific prior written permission.
19 *
20 * 4. This software, with or without modification, must only be used with a
21 * Nordic Semiconductor ASA integrated circuit.
22 *
23 * 5. Any software provided in binary form under this license must not be reverse
24 * engineered, decompiled, modified and/or disassembled.
25 *
26 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
27 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
29 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
30 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
32 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
35 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef NRF_MESH_CONFIG_APP_H__
39#define NRF_MESH_CONFIG_APP_H__
40
41#include "cfg/cs_Config.h"
42#include "fds.h"
43#include "fds_internal_defs.h"
44#include "sdk_config.h"
45
46// See more options in nrf_mesh_config_*.h
47
49#define NRF_MESH_LOG_ENABLE NRF_LOG_BACKEND_RTT_ENABLED
50
52// LOG_LEVEL_ASSERT ( 0) /**< Log level for assertions */
53// LOG_LEVEL_ERROR ( 1) /**< Log level for error messages. */
54// LOG_LEVEL_WARN ( 2) /**< Log level for warning messages. */
55// LOG_LEVEL_REPORT ( 3) /**< Log level for report messages. */
56// LOG_LEVEL_INFO ( 4) /**< Log level for information messages. */
57// LOG_LEVEL_DBG1 ( 5) /**< Log level for debug messages (debug level 1). */
58// LOG_LEVEL_DBG2 ( 6) /**< Log level for debug messages (debug level 2). */
59// LOG_LEVEL_DBG3 ( 7) /**< Log level for debug messages (debug level 3). */
60// EVT_LEVEL_BASE ( 8) /**< Base level for event logging. For internal use only. */
61// EVT_LEVEL_ERROR ( 9) /**< Critical error event logging level. For internal use only. */
62// EVT_LEVEL_INFO (10) /**< Normal event logging level. For internal use only. */
63// EVT_LEVEL_DATA (11) /**< Event data logging level. For internal use only. */
64#define LOG_LEVEL_DEFAULT 7
65
67#define LOG_ENABLE_RTT NRF_LOG_BACKEND_RTT_ENABLED
68
70#define MESH_FEATURE_RELAY_ENABLED (1)
71
75#if MESH_PERSISTENT_STORAGE == 1
76#define PERSISTENT_STORAGE 1
77#else
78#define PERSISTENT_STORAGE 0
79#endif
80
81#if MESH_PERSISTENT_STORAGE == 2
82#define MESH_EXTERNAL_PERSISTENT_STORAGE 1
83#else
84#define MESH_EXTERNAL_PERSISTENT_STORAGE 0
85#endif
86
90#define SCANNER_ACTIVE_SCANNING 1
91
93#define DEVICE_COMPANY_ID (CROWNSTONE_COMPANY_ID)
94
96#define DEVICE_PRODUCT_ID (0x0000)
97
99#define DEVICE_VERSION_ID (0x0000)
100
115#define REPLAY_CACHE_ENTRIES 255
116
120#define ACCESS_DEFAULT_TTL (CS_MESH_DEFAULT_TTL)
121
128#define ACCESS_MODEL_COUNT \
129 (1 /* Configuration server */ \
130 + 1 /* Health server */ \
131 + 1 /* Crownstone multicast model */ \
132 + 1 /* Crownstone multicast acked model */ \
133 + 1 /* Crownstone unicast model */ \
134 + 1 /* Crownstone multicast neighbours model */)
135
142#define ACCESS_ELEMENT_COUNT (1)
143
145#define HEALTH_SERVER_ELEMENT_COUNT (1)
146
153#define ACCESS_SUBSCRIPTION_LIST_COUNT (ACCESS_MODEL_COUNT)
154
158#define ACCESS_FLASH_PAGE_COUNT (1)
159
161#define ACCESS_RELIABLE_TRANSFER_COUNT \
162 (1 /* Configuration server */ \
163 + 1 /* Health server */ \
164 + 1 /* Crownstone unicast model */)
165
167#define MODEL_ACKNOWLEDGED_TRANSACTION_TIMEOUT (SEC_TO_US(3))
168
170//#define DSM_SUBNET_MAX (1)
171#define DSM_SUBNET_MAX (4)
172
174#define DSM_APP_MAX (1)
175//#define DSM_APP_MAX (8)
176
178#define DSM_DEVICE_MAX (1)
179
181#define DSM_VIRTUAL_ADDR_MAX (2)
182
188#define DSM_NONVIRTUAL_ADDR_MAX (ACCESS_MODEL_COUNT + 1)
189
191#define DSM_FLASH_PAGE_COUNT (1)
192
196//#define FLASH_MANAGER_RECOVERY_PAGE_OFFSET_PAGES (FDS_PHY_PAGES)
197// We reserve a few pages for future expansion of FDS pages.
198#define FLASH_MANAGER_RECOVERY_PAGE_OFFSET_PAGES (2 + FDS_PHY_PAGES)
199
200#endif /* NRF_MESH_CONFIG_APP_H__ */