Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mesh_cfg_usr.h « app « STM32_WPAN « BLE_MeshLightingDemo « BLE « Applications « P-NUCLEO-WB55.USBDongle « Projects - github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 216d69fca5588c139d7acab14c6ef47e083d643d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
/**
******************************************************************************
* @file    mesh_cfg_usr.h
* @author  BLE Mesh Team
* @version V1.12.000
* @date    06-12-2019
* @brief   Header file for mesh_usr_cfg.c 
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*   1. Redistributions of source code must retain the above copyright notice,
*      this list of conditions and the following disclaimer.
*   2. Redistributions in binary form must reproduce the above copyright notice,
*      this list of conditions and the following disclaimer in the documentation
*      and/or other materials provided with the distribution.
*   3. Neither the name of STMicroelectronics nor the names of its contributors
*      may be used to endorse or promote products derived from this software
*      without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Initial BLE-Mesh is built over Motorola’s Mesh over Bluetooth Low Energy 
* (MoBLE) technology. The present solution is developed and maintained for both 
* Mesh library and Applications solely by STMicroelectronics.
*
******************************************************************************
*/

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MESH_CFG_USR_H
#define __MESH_CFG_USR_H

/* Includes ------------------------------------------------------------------*/
#include "ble_mesh.h"

/* Exported macro ------------------------------------------------------------*/

/* Macros Used for user defined serial print data for models. 
Either use 0 to disable or 1 to enable
@  TF_GENERIC is responsible for the Generic model traces.
@  TF_LIGHT is responsible for the Light model traces.
@  TF_SENSOR is responsible for the Sensor model traces.
@  TF_VENDOR is responsible for the vendor model traces.
@  TF_NEIGHBOUR is responsible for the neighbour function traces.
@  TF_PROVISION is responsible for the Provision related function traces.
@  TF_LPN_FRND is responsible for the Low power nodef function traces.
@  TF_ELEMENTS is responsible for the element selection function traces.
@  TF_ADDRESS is responsible for the address of element traces.
@  TF_HANDLER is responsible for the interrupt file traces.
@  TF_INIT is responsible for the main function traces.
@  TF_MISC is responsible for the other type traces.

*/
#define TF_GENERIC                                                             0
#define TF_LIGHT                                                               0
#define TF_LIGHT_LC                                                            0
#define TF_SENSOR                                                              0
#define TF_VENDOR                                                              0
#define TF_COMMON                                                              0
#define TF_VENDOR_COMMAND                                                      0
#define TF_NEIGHBOUR                                                           0
#define TF_LPN_FRND                                                            0
#define TF_ELEMENTS                                                            0
#define TF_ADDRESS                                                             0
#define TF_PROVISION                                                           0
#define TF_HANDLER                                                             0
#define TF_INIT                                                                0
#define TF_MISC                                                                0
#define TF_MEMORY                                                              0
#define TF_SERIAL_CTRL                                                         0
#define TF_BEACON                                                              0
#define TF_GENERIC_CLIENT                                                      0
#define TF_LIGHT_CLIENT                                                        0
#define TF_CONFIG_CLIENT                                                       0
#define TF_LIGHT_CLIENT                                                        0

/*******************************************************************************
*** Following section helps to select right configuration of Models  ***********
*******************************************************************************/
/******* Define the following Macros to enable the usage of the  Models  ******/

#ifdef CLIENT
#define ENABLE_GENERIC_MODEL_SERVER_ONOFF 
#endif

#ifdef SERVER
/* Define the following Macros to enable the usage of the Server Generic Models  */
#define ENABLE_GENERIC_MODEL_SERVER_ONOFF 
#define ENABLE_GENERIC_MODEL_SERVER_LEVEL
//#define ENABLE_GENERIC_MODEL_SERVER_POWER_ONOFF
//#define ENABLE_GENERIC_MODEL_SERVER_POWER_ONOFF_SETUP
//#define ENABLE_GENERIC_MODEL_SERVER_DEFAULT_TRANSITION_TIME

/* The Following Models are not available in this version, will be developed in 
   next version.
*/

//#define ENABLE_GENERIC_MODEL_SERVER_POWER_LEVEL
//#define ENABLE_GENERIC_MODEL_SERVER_POWER_LEVEL_SETUP
/*
#define ENABLE_GENERIC_MODEL_SERVER_BATTERY
#define ENABLE_GENERIC_MODEL_SERVER_LOCATION
#define ENABLE_GENERIC_MODEL_SERVER_LOCATION_SETUP
#define ENABLE_GENERIC_MODEL_SERVER_ADMIN_PROPERTY
#define ENABLE_GENERIC_MODEL_SERVER_MANUFACTURER_PROPERTY
#define ENABLE_GENERIC_MODEL_SERVER_USER_PROPERTY
#define ENABLE_GENERIC_MODEL_SERVER_CLIENT_PROPERTY

*/

/******************************************************************************/
/******* Define the following Macros to enable the usage of the Light Models  */
/******************************************************************************/

#define ENABLE_LIGHT_MODEL_SERVER_LIGHTNESS
#define ENABLE_LIGHT_MODEL_SERVER_LIGHTNESS_SETUP 
//#define ENABLE_LIGHT_MODEL_SERVER_CTL
//#define ENABLE_LIGHT_MODEL_SERVER_CTL_SETUP 
//#define ENABLE_LIGHT_MODEL_SERVER_CTL_TEMPERATURE
//#define ENABLE_LIGHT_MODEL_SERVER_HSL 
//#define ENABLE_LIGHT_MODEL_SERVER_HSL_SETUP  
//#define ENABLE_LIGHT_MODEL_SERVER_HSL_HUE 
//#define ENABLE_LIGHT_MODEL_SERVER_HSL_SATURATION 

/* 
   The following Models are managed in different file light_lc.c in middleware
*/
//#define ENABLE_LIGHT_MODEL_SERVER_LC 
//#define ENABLE_LIGHT_MODEL_SERVER_LC_SETUP 

/******************************************************************************/
/* Define the following Macros to enable the usage of the Sensor Models  */
/******************************************************************************/

//#define ENABLE_SENSOR_MODEL_SERVER
//#define ENABLE_SENSOR_MODEL_SERVER_SETUP

/******************************************************************************/
/* Define the following Macros to enable the usage of the time and scene Models */
/******************************************************************************/

//#define ENABLE_TIME_MODEL_SERVER
//#define ENABLE_TIME_MODEL_SERVER_SETUP
//#define ENABLE_SCENE_MODEL_SERVER
//#define ENABLE_SCENE_MODEL_SERVER_SETUP

/* 
   The Following Models are not available in this version
*/
//#define ENABLE_LIGHT_MODEL_SERVER_XYL 
//#define ENABLE_LIGHT_MODEL_SERVER_XYL_SETUP 

/******* Define the following Macros to enable the vendor model  ******/
//#define ENABLE_VENDOR_MODEL_SERVER  
#define GENERIC_SERVER_MODEL_PUBLISH  
#endif

#ifdef CLIENT
/* Define the following Macros to enable the usage of the Client Generic Models  */
#define ENABLE_GENERIC_MODEL_CLIENT_ONOFF 
#define ENABLE_GENERIC_MODEL_CLIENT_LEVEL
#define ENABLE_LIGHT_MODEL_CLIENT_LIGHTNESS
#define ENABLE_CONFIG_MODEL_CLIENT

/******************************************************************************/
/*
Define the Macro for enabling/disabling the Publishing with Generic on off
or by Vendor Model.
@ define Macro for Vendor Publishing
@ Undefine or comment Macro for Generic On Off Publishing
*/
//#define VENDOR_CLIENT_MODEL_PUBLISH
#define GENERIC_CLIENT_MODEL_PUBLISH  
//#define LIGHT_CLIENT_MODEL_PUBLISH
 
#if defined (ENABLE_GENERIC_MODEL_CLIENT_ONOFF) \
    || defined (ENABLE_GENERIC_MODEL_CLIENT_LEVEL) 
      
 #define ENABLE_GENERIC_MODEL_CLIENT
#endif

#if defined (ENABLE_LIGHT_MODEL_CLIENT_LIGHTNESS) 
         
 #define ENABLE_LIGHT_MODEL_CLIENT
#endif      
      
#endif

/******************************************************************************/
/*
Define the Macros for Enabling/disabling the binding of data between the Generic 
and Light model.
@ define the Macro for enabling the binding
@ Undefine or comment the macro for disabling the binding.
*/
/******************************************************************************/
//#define ENABLE_MODEL_BINDING

/* Define the macros for the numbers of sensor present.*/
#define NUMBER_OF_SENSOR                   2
//#define ENABLE_OCCUPANCY_SENSOR
/*
Macro is responsible for enabling and desabling the sensor publication.
Comment this macro to disable the publication
*/
//#define ENABLE_SENSOR_PUBLICATION

/******************************************************************************/


/* Maximum Time period value of PWM */
#define PWM_TIME_PERIOD                    31990U

/******************************************************************************/
/***** MACROS for POWER ON-OFF CYCLE BASED UNPROVISIONING *********************/
/******************************************************************************/

/*
Define the following Macro to check the Power-OnOff Cycles
5 Continous cycles of OnOff with Ontime <2 sec will cause unprovisioning
*/
//#define ENABLE_UNPROVISIONING_BY_POWER_ONOFF_CYCLE

#define POWER_ON_OFF_CYCLES_FOR_UNPROVISIONING 5
#define MASK_BITS_FOR_POWER_ON_OFF_CYCLES  (0xFFFFFFFF << POWER_ON_OFF_CYCLES_FOR_UNPROVISIONING)      
      /* 0xFFFFFFE0 */
#define ON_TIME_IN_SECONDS_FOR_POWER_CYCLING 2
#define BLINK_TIMES_FOR_FACTORY_RESET 5

/* 
Define the following Macro to save Generic and Light Model states in NVM
This may result into excessive flash erase operations, this should be avoided to ensure flash longevity
*/
#define ENABLE_SAVE_MODEL_STATE_NVM

/* Only one Macro will be enable at one time */
//#define SAVE_MODEL_STATE_FOR_ALL_MESSAGES         
//#define SAVE_MODEL_STATE_POWER_FAILURE_DETECTION

/*      
Define the following Macro to save the nodes data in provisioner in NVM
This may result into excessive flash erase operations, this should be avoided to ensure flash longevity
*/
#define SAVE_EMBD_PROVISION_DATA     1
/* Macros defined for the number of bytes saved, number of bytes dedicated for ganeric 
  model and light model.
*/     
#define APP_NVM_GENERIC_MODEL_SIZE        16U
#define APP_NVM_LIGHT_MODEL_SIZE          16U
#define APP_NVM_MODEL_SIZE                40U
      
/*Macros are defined for the selection of the number of led and type of lighting 
  used for the application.
*if board has one led, uncomment USER_BOARD_1LED 
*if board has cool warm leds, uncomment USER_BOARD_COOL_WHITE_LED
*if board has RGB leds, uncomment USER_BOARD_RGB_LED
*if board has RGB leds as well as cool warm leds, uncomment USER_BOARD_COOL_WHITE_LED
  and USER_BOARD_RGB_LED
*/
/* comment ENABLE_GENERIC_MODEL_SERVER_DEFAULT_TRANSITION_TIME when using 
   USER_BOARD_COOL_WHITE_LED ,USER_BOARD_RGB_LED
   Default transition is provided only for one led.
*/      
#define  USER_BOARD_1LED      
//#define  USER_BOARD_COOL_WHITE_LED
//#define  USER_BOARD_RGB_LED 

/* Note: Please use Full Library configuration in project options to use the full 
         configuration of the C/C++ runtime library for printf and scanf functionality */

/* Enables the serial interface using Uart */
#define ENABLE_SERIAL_INTERFACE            1
#define ENABLE_UT                          0
#define ENABLE_SERIAL_CONTROL              1
#define ENABLE_APPLI_TEST                  0
#ifdef CLIENT
#define ENABLE_SERIAL_PRVN                 1
#endif
      
/*******************************************************************************
*** Following section helps to configure the Application of Mesh     ***********
*******************************************************************************/

#define APPLICATION_NUMBER_OF_ELEMENTS                                         1

/* Contains a 16-bit company identifier assigned by the Bluetooth SIG
(the list is available @ https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers )
For STMicroelectronics : it is 0x0030 */
#define COMPANY_ID                                                        0x0030

/* Contains a 16-bit vendor-assigned product identifier */
#define PRODUCT_ID                                                        0x0002

/* Contains a 16-bit vendor-assigned product version ID */
#define PRODUCT_VERSION_ID                                                0x010A   

#define MAX_APPLICATION_PACKET_SIZE                                          160

#define TPT_SEGMENT_COUNT                  (((MAX_APPLICATION_PACKET_SIZE)/12)+2)

/*******************************************************************************
********** MAC Address Configuration *******************************************
*******************************************************************************/

/*
*  Define to enable external MAC handling, 
*  DONT change the Values 0x01, 0x02, 0x03 
*  SELECT ONLY One of the Option 
*/
//#define GENERATE_STATIC_RANDOM_MAC                                          0x01   
//#define EXTERNAL_MAC_ADDR_MGMT                                              0x02
#define INTERNAL_UNIQUE_NUMBER_MAC                                          0x03

/* Declare this value as 0x01 if the External Address is PUBLIC Address */
/* For example like this: #define EXTERNAL_MAC_IS_PUBLIC_ADDR 0x1       */
/* Else, by default, the external address will be treated as RANDOM     */
#define EXTERNAL_MAC_IS_PUBLIC_ADDR                                          0x0

/******************************************************************************/


/*******************************************************************************
****** Following section helps to select right configuration of node ***********
*******************************************************************************/
/* 
*  Minimum gap between successive transmissions
*  varies from 10 to 65535 
*/
#define TR_GAP_BETWEEN_TRANSMISSION                                          50U


/*
*  Different provision bearer supported by BLE-Mesh. Define according to application.
*      Atleast one of PB-ADV and PB-GATT should be defined
*/
#define ENABLE_PB_ADV
#define ENABLE_PB_GATT
//#define ENABLE_PUB_KEY_TYPE_OOB
//#define ENABLE_AUTH_TYPE_STATIC_OOB
//#define ENABLE_AUTH_TYPE_OUTPUT_OOB
//#define ENABLE_AUTH_TYPE_INPUT_OOB

/* Static OOB Configurations */
#ifdef ENABLE_AUTH_TYPE_STATIC_OOB
#define STATIC_OOB_SIZE                                                      16U 
#else
#define STATIC_OOB_SIZE                                                       0U 
#endif
/* Output OOB Configurations */
#ifdef ENABLE_AUTH_TYPE_OUTPUT_OOB
#define OUTPUT_OOB_SIZE                              1U 
#define OUTPUT_OOB_ACTION                            OUTPUT_OOB_ACTION_BIT_BLINK 
#else
#define OUTPUT_OOB_SIZE                              0U 
#define OUTPUT_OOB_ACTION                            OUTPUT_OOB_ACTION_BIT_BLINK 
#endif

/* Input OOB Configurations */
#ifdef ENABLE_AUTH_TYPE_INPUT_OOB
#define INPUT_OOB_SIZE                    1U 
#define INPUT_OOB_ACTION                  INPUT_OOB_ACTION_BIT_PUSH 
#else
#define INPUT_OOB_SIZE                    0U 
#define INPUT_OOB_ACTION                  INPUT_OOB_ACTION_BIT_PUSH 
#endif

/*
*  Different features supported by BLE-Mesh. Uncomment according to application.
*      Low power feature enabled node do not support other features. 
*      Do not define any other feature if Low Power feature is defined
*/
#define ENABLE_RELAY_FEATURE
#define ENABLE_PROXY_FEATURE
#define ENABLE_FRIEND_FEATURE
//#define ENABLE_LOW_POWER_FEATURE
#ifdef CLIENT
#define ENABLE_PROVISIONER_FEATURE
#endif
      
/*
* Friend node receive window size is fixed at 50 ms
*/

/* 
* Friend node subscription list size is fixed at 4
*/

/* 
* Friend node maximum number of messages is fixed at 16
*/

/* 
*  Number of Low power nodes that can be associated with Friend node
*  varies from 1 to 10
*/
#define FN_NO_OF_LPNS                                                         6U

/* 
*  For prioritizing friendship offer with good RSSI link
*  varies from 0 to 3
*  Ref @Mesh_v1.0
*  0  ->  1
*  1  ->  1.5
*  2  ->  2
*  3  ->  2.5
*/
#define LPN_RSSI_FACTOR_LEVEL                                                 1U

/* 
*  For prioritizing friendship offer with good receive window factor
*  varies from 0 to 3
*  Ref @Mesh_v1.0
*  0  ->  1
*  1  ->  1.5
*  2  ->  2
*  3  ->  2.5
*/
#define LPN_RECIVE_WINDOW_FACTOR_LEVEL                                        1U

/* 
*  Minimum packets queue size required by Low Power node
*  varies from 1 to 7
*  Ref @Mesh_v1.0
*  1  ->  2
*  2  ->  4
*  3  ->  8
*  4  ->  16
*  5  ->  32
*  6  ->  64
*  7  ->  128
*/
#define LPN_MINIMUM_QUEUE_SIZE_LOG                                            2U

/* 
*  (unit ms)
*  varies from 0x0A to 0xFF
*  Ref @Mesh_v1.0
*  0x0A  ->  10ms
*  0xFF  ->  255ms
*/
#define LPN_RECEIVE_DELAY                                                   150U

/* 
*  Poll timeout value after which friendship cease to exist (unit 100ms)
*  varies from 0x00000A to 0x34BBFF
*  Ref @Mesh_v1.0
*  0x00000A  ->  1 second
*  0x34BBFF  ->  96 hours
*/
#define LPN_POLL_TIMEOUT                                                   2000U

/* 
*  Maximum receive window size acceptable to low power node (unit ms)
*  varies from 0x0A to 0xFF
*  Ref @Mesh_v1.0
*  0x0A  ->  10ms
*  0xFF  ->  255ms
*/
#define LPN_RECEIVE_WINDOW_SIZE                                              255U/*55U*/

/* 
*  Minimum friend's subscription list size capability required by lpn
*  varies from 1 to 5
*  Ref @Mesh_v1.0
*/
#define LPN_SUBSCR_LIST_SIZE                                                  2U

/* 
*  Frequency at which low power node would send friend request (unit 100ms)
*  varies from 0 to 255
*  100  ->  10s
*/
#define LPN_FRIEND_REQUEST_FREQUENCY                                         50U

/* 
*  Frequency at which low power node would poll friend node (unit 100ms)
*  should be less than poll timeout
*  100  ->  10s
*/
#define LPN_FRIEND_POLL_FREQUENCY                                            25U

/* 
*  Minimum RSSI required by low power node
*  should be less than equal to -60
*/
#define LPN_MINIMUM_RSSI                                                    -100

/* 
*  Retries to be made by lpn before termination of friendship
*  varies from 2 to 10
*/
#define LPN_NO_OF_RETRIES                                                    10U

/* 
*  Maximum address list size buffer in Friend Subscription List Add Message is 10
*/
      

/*
*  Enable or disable neighbor table
*  if defined -> enabled
*    If MAC address of neighbor changes it appears as new neighbor
*    Neighbor table update can be triggered (configurable) in following cases
*      On receiving Unprovisioned device beacon
*      On receiving Secure network beacon
*      On receiving Mesh message
*        Message with any TTL
*        Message with TTL = 0
*  if not defined -> disabled
*/
#define ENABLE_NEIGHBOR_TABLE

/*
*  Size of neighbor table
*/
#define NEIGHBOR_COUNT                                                        5U

/* 
*  (unit s)
*  Duration (wrt appear or last refresh) for which neighbor exists in neighbor table
*/
#define NEIGHBOR_ALIVE_TIME                                                  20U

/* 
*  Enable/disable neighbor table update with unprovisioned device beacon
*  0: Disable neighbor table update with unprovisioned device beacon
*  1: Enable neighbor table update with unprovisioned device beacon
*/
#define NEIGHBOR_UNPRVND_DEV_BEACON_NTU                                      1U

/* 
*  Enable/disable neighbor table update with secure network beacon
*  0: Disable neighbor table update with secure network beacon
*  1: Enable neighbor table update with secure network beacon
*/
#define NEIGHBOR_SECURE_NET_BEACON_NTU                                       0U

/* 
*  Enable/disable neighbor table update with TTL 0 message
*  0: Disable neighbor table update messages
*  1: Enable neighbor table update with messages with 0 TTL
*  2: Enable neighbor table update with messages with any TTL
*/
#define NEIGHBOR_MSG_TTLX_NTU                                                0U

/*******************************************************************************
*** Following section helps to configure the LEDs of Application of Mesh     ***********
*******************************************************************************/

#if defined USE_STM32WBXX_NUCLEO || defined USE_STM32WBXX_USB_DONGLE
  #define SINGLE_LED   PWM4
  #define COOL_LED     PWM0
  #define WARM_LED     PWM1
  #define RED_LED      PWM2
  #define GREEN_LED    PWM3
  #define BLUE_LED     PWM4 
#endif   

/* Following Macro helps to know if the Fixed functions are needed or not 
   DO NOT change or add any space at the end of the file */
#if defined (ENABLE_GENERIC_MODEL_SERVER_ONOFF) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_LEVEL) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_POWER_ONOFF) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_POWER_ONOFF_SETUP) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_DEFAULT_TRANSITION_TIME) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_POWER_LEVEL) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_POWER_LEVEL_SETUP) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_BATTERY) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_LOCATION) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_LOCATION_SETUP) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_ADMIN_PROPERTY) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_MANUFACTURER_PROPERTY) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_USER_PROPERTY) \
    || defined (ENABLE_GENERIC_MODEL_SERVER_CLIENT_PROPERTY)
 #define ENABLE_GENERIC_MODEL_SERVER
 #define GENERIC_SERVER_MODEL_ADD_CONFIGURATION     
      
#endif      


/* Following Macro helps to know if the Fixed functions are needed or not 
   DO NOT change or add any space at the end of the file */
#if defined(ENABLE_LIGHT_MODEL_SERVER_LIGHTNESS) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_LIGHTNESS_SETUP) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_CTL) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_CTL_SETUP) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_CTL_TEMPERATURE) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_HSL) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_HSL_SETUP) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_HSL_HUE) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_HSL_SATURATION) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_LC) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_LC_SETUP) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_XYL) \
    || defined(ENABLE_LIGHT_MODEL_SERVER_XYL_SETUP)
  #define  ENABLE_LIGHT_MODEL_SERVER 
  #define LIGHT_SERVER_MODEL_ADD_CONFIGURATION    
#endif  

#if defined(ENABLE_TIME_MODEL_SERVER) \
    || defined(ENABLE_TIME_MODEL_SERVER_SETUP)\
    || defined(ENABLE_SCENE_MODEL_SERVER)\
    || defined(ENABLE_SCENE_MODEL_SERVER_SETUP)
   #define ENABLE_TIME_SCENE_MODEL_SERVER
#endif             

/* Exported variables  -------------------------------------------------------*/
/* Exported Functions Prototypes ---------------------------------------------*/

#endif /* __MESH_CFG_USR_H */