nRF5 SDK for Mesh v2.2.0
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 
62 #ifndef PERSISTENT_STORAGE
63 #define PERSISTENT_STORAGE 1
64 #endif
65 
69 #ifndef NRF_MESH_UECC_ENABLE
70 #define NRF_MESH_UECC_ENABLE 1
71 #endif
72 
76 #define FLASH_MANAGER_BACKEND
77 
94 #ifndef AES_USE_HARDWARE
95 #define AES_USE_HARDWARE 1
96 #endif
97 
106 #ifndef CORE_TX_QUEUE_BUFFER_SIZE_ORIGINATOR
107 #define CORE_TX_QUEUE_BUFFER_SIZE_ORIGINATOR 256
108 #endif
109 
111 #ifndef CORE_TX_QUEUE_BUFFER_SIZE_RELAY
112 #define CORE_TX_QUEUE_BUFFER_SIZE_RELAY 128
113 #endif
114 
116 #ifndef CORE_TX_QUEUE_BUFFER_SIZE_INSTABURST_ORIGINATOR
117 #define CORE_TX_QUEUE_BUFFER_SIZE_INSTABURST_ORIGINATOR 4096
118 #endif
119 
121 #ifndef CORE_TX_QUEUE_BUFFER_SIZE_INSTABURST_RELAY
122 #define CORE_TX_QUEUE_BUFFER_SIZE_INSTABURST_RELAY 2048
123 #endif
124 
126 #ifndef CORE_TX_INSTABURST_CHANNELS
127 #define CORE_TX_INSTABURST_CHANNELS \
128  {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, \
129  19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36}
130 #endif
131 
133 #ifndef CORE_TX_REPEAT_ORIGINATOR_DEFAULT
134 #define CORE_TX_REPEAT_ORIGINATOR_DEFAULT 1
135 #endif
136 
138 #ifndef CORE_TX_REPEAT_RELAY_DEFAULT
139 #define CORE_TX_REPEAT_RELAY_DEFAULT 1
140 #endif
141 
150 #ifndef CCM_DEBUG_MODE_ENABLED
151 #define CCM_DEBUG_MODE_ENABLED 0
152 #endif
153 
165 #ifndef FIFO_STATS
166 #define FIFO_STATS 0
167 #endif
168 
181 #ifndef INTERNAL_EVT_ENABLE
182 #define INTERNAL_EVT_ENABLE 0
183 #endif
184 
186 #ifndef INTERNAL_EVENT_BUFFER_SIZE
187 #define INTERNAL_EVENT_BUFFER_SIZE 32
188 #endif
189 
198 #ifndef NRF_MESH_LOG_ENABLE
199 #define NRF_MESH_LOG_ENABLE 1
200 #endif
201 
203 #ifndef LOG_LEVEL_DEFAULT
204 #define LOG_LEVEL_DEFAULT LOG_LEVEL_WARN
205 #endif
206 
208 #ifndef LOG_MSK_DEFAULT
209 #define LOG_MSK_DEFAULT LOG_GROUP_STACK
210 #endif
211 
213 #ifndef LOG_ENABLE_RTT
214 #define LOG_ENABLE_RTT 1
215 #endif
216 
218 #ifndef LOG_CALLBACK_DEFAULT
219 #if defined(NRF51) || defined(NRF52_SERIES)
220  #define LOG_CALLBACK_DEFAULT log_callback_rtt
221 #else
222  #define LOG_CALLBACK_DEFAULT log_callback_stdout
223 #endif
224 #endif
225 
234 #ifndef MSG_CACHE_ENTRY_COUNT
235 #define MSG_CACHE_ENTRY_COUNT 32
236 #endif
237 
249 #ifndef NETWORK_SEQNUM_IV_UPDATE_START_THRESHOLD
250 #define NETWORK_SEQNUM_IV_UPDATE_START_THRESHOLD (NETWORK_SEQNUM_MAX / 2)
251 #endif
252 
257 #ifndef NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD
258 #define NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD (NETWORK_SEQNUM_MAX - TRANSPORT_SAR_SEQNUM_DIFF_MAX)
259 #endif
260 
261 /* Sanity check for NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD */
262 #if NETWORK_SEQNUM_IV_UPDATE_START_THRESHOLD > NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD
263 #error "The network sequence number start threshold must be lower than the end threshold."
264 #endif
265 #if NETWORK_SEQNUM_IV_UPDATE_END_THRESHOLD > (NETWORK_SEQNUM_MAX - TRANSPORT_SAR_SEQNUM_DIFF_MAX)
266 #error "The network sequence number IV update threshold must be low enough to fit a full SAR session."
267 #endif
268 
275 #ifndef NETWORK_SEQNUM_FLASH_BLOCK_SIZE
276 #define NETWORK_SEQNUM_FLASH_BLOCK_SIZE 8192ul
277 #endif
278 
283 #ifndef NETWORK_SEQNUM_FLASH_BLOCK_THRESHOLD
284 #define NETWORK_SEQNUM_FLASH_BLOCK_THRESHOLD 64
285 #endif
286 
290 #ifndef NET_FLASH_PAGE_COUNT
291 #define NET_FLASH_PAGE_COUNT 1
292 #endif
293 
301 #ifndef TRANSPORT_SAR_SESSIONS_MAX
302 #define TRANSPORT_SAR_SESSIONS_MAX (4)
303 #endif
304 
306 #ifndef TRANSPORT_SAR_RX_CACHE_LEN
307 #define TRANSPORT_SAR_RX_CACHE_LEN (8)
308 #endif
309 
311 #ifndef TRANSPORT_SAR_SEGACK_TTL_DEFAULT
312 #define TRANSPORT_SAR_SEGACK_TTL_DEFAULT (8)
313 #endif
314 
328 #ifndef PACKET_MGR_DEBUG_MODE
329 #define PACKET_MGR_DEBUG_MODE 0
330 #endif
331 
332 
338 #ifndef PACKET_MGR_MEMORY_POOL_SIZE
339 #define PACKET_MGR_MEMORY_POOL_SIZE 4096
340 #endif
341 
351 #ifndef PACKET_MGR_BLAME_MODE
352 #define PACKET_MGR_BLAME_MODE 0
353 #endif
354 
369 #ifndef PACKET_BUFFER_DEBUG_MODE
370 #define PACKET_BUFFER_DEBUG_MODE 0
371 #endif
372 
394 #ifndef REPLAY_CACHE_ENTRIES
395 #define REPLAY_CACHE_ENTRIES 40
396 #endif
397 
406 #ifndef FLASH_MANAGER_PAGE_COUNT_MAX
407 #define FLASH_MANAGER_PAGE_COUNT_MAX 255
408 #endif
409 
411 #ifndef FLASH_MANAGER_POOL_SIZE
412 #define FLASH_MANAGER_POOL_SIZE 256
413 #endif
414 
416 #ifndef FLASH_MANAGER_ENTRY_MAX_SIZE
417 #define FLASH_MANAGER_ENTRY_MAX_SIZE 128
418 #endif
419 
423 #ifndef FLASH_MANAGER_RECOVERY_PAGE_OFFSET_PAGES
424 #define FLASH_MANAGER_RECOVERY_PAGE_OFFSET_PAGES 0
425 #endif
426 
435 #ifndef MESH_FEATURE_GATT
436 #define MESH_FEATURE_GATT 0
437 #endif
438 
440 #ifndef GATT_PROXY
441 #define GATT_PROXY 0
442 #endif
443 
445 #ifndef MESH_GATT_PROXY_FILTER_ADDR_COUNT
446 #define MESH_GATT_PROXY_FILTER_ADDR_COUNT 32
447 #endif
448 
455 #ifndef MESH_GATT_PROXY_ADV_INT_MS
456 #define MESH_GATT_PROXY_ADV_INT_MS 2000
457 #endif
458 
460 #ifndef MESH_GATT_PROXY_BEACON_CACHE_SIZE
461 #define MESH_GATT_PROXY_BEACON_CACHE_SIZE 8
462 #endif
463 
478 #ifndef ACCESS_MODEL_PUBLISH_PERIOD_RESTORE
479 #define ACCESS_MODEL_PUBLISH_PERIOD_RESTORE 0
480 #endif
481 
482 
487 #endif

Documentation feedback | Developer Zone | Subscribe | Updated