nRF5 SDK for Mesh v2.1.1
nrf_mesh_config_core.h
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_CORE_H__
39 #define NRF_MESH_CONFIG_CORE_H__
40 
41 #include "nrf_mesh_defines.h"
42 #ifdef CONFIG_APP_IN_CORE
43 #include "nrf_mesh_config_app.h"
44 #endif
45 
61 #ifndef PERSISTENT_STORAGE
62 #define PERSISTENT_STORAGE 1
63 #endif
64 
68 #ifndef NRF_MESH_UECC_ENABLE
69 #define NRF_MESH_UECC_ENABLE 1
70 #endif
71 
88 #ifndef AES_USE_HARDWARE
89 #define AES_USE_HARDWARE 1
90 #endif
91 
100 #ifndef CORE_TX_QUEUE_BUFFER_SIZE_ORIGINATOR
101 #define CORE_TX_QUEUE_BUFFER_SIZE_ORIGINATOR 256
102 #endif
103 
105 #ifndef CORE_TX_QUEUE_BUFFER_SIZE_RELAY
106 #define CORE_TX_QUEUE_BUFFER_SIZE_RELAY 128
107 #endif
108 
110 #ifndef CORE_TX_QUEUE_BUFFER_SIZE_INSTABURST_ORIGINATOR
111 #define CORE_TX_QUEUE_BUFFER_SIZE_INSTABURST_ORIGINATOR 4096
112 #endif
113 
115 #ifndef CORE_TX_QUEUE_BUFFER_SIZE_INSTABURST_RELAY
116 #define CORE_TX_QUEUE_BUFFER_SIZE_INSTABURST_RELAY 2048
117 #endif
118 
120 #ifndef CORE_TX_INSTABURST_CHANNELS
121 #define CORE_TX_INSTABURST_CHANNELS \
122  {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, \
123  19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36}
124 #endif
125 
127 #ifndef CORE_TX_REPEAT_ORIGINATOR_DEFAULT
128 #define CORE_TX_REPEAT_ORIGINATOR_DEFAULT 1
129 #endif
130 
132 #ifndef CORE_TX_REPEAT_RELAY_DEFAULT
133 #define CORE_TX_REPEAT_RELAY_DEFAULT 1
134 #endif
135 
144 #ifndef CCM_DEBUG_MODE_ENABLED
145 #define CCM_DEBUG_MODE_ENABLED 0
146 #endif
147 
159 #ifndef FIFO_STATS
160 #define FIFO_STATS 0
161 #endif
162 
175 #ifndef INTERNAL_EVT_ENABLE
176 #define INTERNAL_EVT_ENABLE 0
177 #endif
178 
180 #ifndef INTERNAL_EVENT_BUFFER_SIZE
181 #define INTERNAL_EVENT_BUFFER_SIZE 32
182 #endif
183 
192 #ifndef NRF_MESH_LOG_ENABLE
193 #define NRF_MESH_LOG_ENABLE 1
194 #endif
195 
197 #ifndef LOG_LEVEL_DEFAULT
198 #define LOG_LEVEL_DEFAULT LOG_LEVEL_WARN
199 #endif
200 
202 #ifndef LOG_MSK_DEFAULT
203 #define LOG_MSK_DEFAULT LOG_GROUP_STACK
204 #endif
205 
207 #ifndef LOG_ENABLE_RTT
208 #define LOG_ENABLE_RTT 1
209 #endif
210 
212 #ifndef LOG_CALLBACK_DEFAULT
213 #if defined(NRF51) || defined(NRF52_SERIES)
214  #define LOG_CALLBACK_DEFAULT log_callback_rtt
215 #else
216  #define LOG_CALLBACK_DEFAULT log_callback_stdout
217 #endif
218 #endif
219 
228 #ifndef MSG_CACHE_ENTRY_COUNT
229 #define MSG_CACHE_ENTRY_COUNT 32
230 #endif
231 
243 #ifndef NETWORK_SEQNUM_IV_UPDATE_START_THRESHOLD
244 #define NETWORK_SEQNUM_IV_UPDATE_START_THRESHOLD (NETWORK_SEQNUM_MAX / 2)
245 #endif
246 
251 #ifndef NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD
252 #define NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD (NETWORK_SEQNUM_MAX - TRANSPORT_SAR_SEQNUM_DIFF_MAX)
253 #endif
254 
255 /* Sanity check for NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD */
256 #if NETWORK_SEQNUM_IV_UPDATE_START_THRESHOLD > NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD
257 #error "The network sequence number start threshold must be lower than the end threshold."
258 #endif
259 #if NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD > (NETWORK_SEQNUM_MAX - TRANSPORT_SAR_SEQNUM_DIFF_MAX)
260 #error "The network sequence number IV update threshold must be low enough to fit a full SAR session."
261 #endif
262 
269 #ifndef NETWORK_SEQNUM_FLASH_BLOCK_SIZE
270 #define NETWORK_SEQNUM_FLASH_BLOCK_SIZE 8192
271 #endif
272 
277 #ifndef NETWORK_SEQNUM_FLASH_BLOCK_THRESHOLD
278 #define NETWORK_SEQNUM_FLASH_BLOCK_THRESHOLD 64
279 #endif
280 
284 #ifndef NET_FLASH_PAGE_COUNT
285 #define NET_FLASH_PAGE_COUNT 1
286 #endif
287 
295 #ifndef TRANSPORT_SAR_SESSIONS_MAX
296 #define TRANSPORT_SAR_SESSIONS_MAX (4)
297 #endif
298 
300 #ifndef TRANSPORT_SAR_RX_CACHE_LEN
301 #define TRANSPORT_SAR_RX_CACHE_LEN (8)
302 #endif
303 
305 #ifndef TRANSPORT_SAR_SEGACK_TTL_DEFAULT
306 #define TRANSPORT_SAR_SEGACK_TTL_DEFAULT (8)
307 #endif
308 
322 #ifndef PACKET_MGR_DEBUG_MODE
323 #define PACKET_MGR_DEBUG_MODE 0
324 #endif
325 
326 
332 #ifndef PACKET_MGR_MEMORY_POOL_SIZE
333 #define PACKET_MGR_MEMORY_POOL_SIZE 4096
334 #endif
335 
345 #ifndef PACKET_MGR_BLAME_MODE
346 #define PACKET_MGR_BLAME_MODE 0
347 #endif
348 
363 #ifndef PACKET_BUFFER_DEBUG_MODE
364 #define PACKET_BUFFER_DEBUG_MODE 0
365 #endif
366 
380 #ifndef REPLAY_CACHE_ENTRIES
381 #define REPLAY_CACHE_ENTRIES 32
382 #endif
383 
392 #ifndef FLASH_MANAGER_PAGE_COUNT_MAX
393 #define FLASH_MANAGER_PAGE_COUNT_MAX 255
394 #endif
395 
397 #ifndef FLASH_MANAGER_POOL_SIZE
398 #define FLASH_MANAGER_POOL_SIZE 256
399 #endif
400 
402 #ifndef FLASH_MANAGER_ENTRY_MAX_SIZE
403 #define FLASH_MANAGER_ENTRY_MAX_SIZE 128
404 #endif
405 
409 #ifndef FLASH_MANAGER_RECOVERY_PAGE_OFFSET_PAGES
410 #define FLASH_MANAGER_RECOVERY_PAGE_OFFSET_PAGES 0
411 #endif
412 
421 #ifndef MESH_FEATURE_GATT
422 #define MESH_FEATURE_GATT 0
423 #endif
424 
426 #ifndef GATT_PROXY
427 #define GATT_PROXY 0
428 #endif
429 
431 #ifndef MESH_GATT_PROXY_FILTER_ADDR_COUNT
432 #define MESH_GATT_PROXY_FILTER_ADDR_COUNT 32
433 #endif
434 
436 #ifndef MESH_GATT_PROXY_ADV_INT_MS
437 #define MESH_GATT_PROXY_ADV_INT_MS 2000
438 #endif
439 
441 #ifndef MESH_GATT_PROXY_BEACON_CACHE_SIZE
442 #define MESH_GATT_PROXY_BEACON_CACHE_SIZE 8
443 #endif
444 
448 #endif

Documentation feedback | Developer Zone | Subscribe | Updated