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

mesh_cfg_usr.h « app « STM32_WPAN « BLE_MeshLightingLPN « 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: 54bbc4966b569ce4a445dc254ec2b0b8fec335e5 (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
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file    mesh_cfg_usr.h
  * @author  BLE Mesh Team
  * @brief   Header file for mesh_usr_cfg.c 
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under Ultimate Liberty license
  * SLA0044, the "License"; You may not use this file except in compliance with
  * the License. You may obtain a copy of the License at:
  *                             www.st.com/SLA0044
  *
  ******************************************************************************
  */

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

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

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

/*
*  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_LOW_POWER_FEATURE
      
/* Macros Used for user defined serial print data for models. 
Either use 0 to disable or 1 to enable
@  TF_GENERIC -> Generic server
@  TF_GENERIC_CLIENT -> Generic client
@  TF_SENSOR -> Sensor server
@  TF_LIGHT -> Lighting server
@  TF_LIGHT_CLIENT -> Lighting client
@  TF_LIGHT_LC -> Light LC server
@  TF_VENDOR -> vendor model
@  TF_CONFIG_CLIENT -> config client
@  TF_LPN_FRND -> Friendship, Friend and Low Power
@  TF_PROVISION -> Provisioning related
@  TF_HANDLER -> interrupt handler
@  TF_INIT -> main function
@  TF_MISC -> others
@  TF_COMMON -> common (middleware)
@  TF_GENERIC_M -> Generic server (middleware)
@  TF_GENERIC_CLIENT_M -> Config client (middleware)
@  TF_SENSOR_M -> Sensor server (middleware)
@  TF_LIGHT_M -> Lighting server (middleware)
@  TF_LIGHT_CLIENT_M -> Lighting client (middleware)
@  TF_LIGHT_LC_M -> Light LC server (middleware)
@  TF_VENDOR_M -> vendor model (middleware)
@  TF_CONFIG_CLIENT_M -> Config client (middleware)
@  TF_NEIGHBOUR -> neighbour table
@  TF_MEMORY
@  TF_BEACON -> Beacons
@  TF_SERIAL_CTRL
*/
#define TF_GENERIC                                                             1
#define TF_GENERIC_CLIENT                                                      1
#define TF_SENSOR                                                              1
#define TF_LIGHT                                                               1
#define TF_LIGHT_CLIENT                                                        1
#define TF_LIGHT_LC                                                            1
#define TF_VENDOR                                                              1
#define TF_CONFIG_CLIENT                                                       1
#define TF_LPN_FRND                                                            1
#define TF_PROVISION                                                           1
#define TF_HANDLER                                                             1
#define TF_INIT                                                                1
#define TF_MISC                                                                1
/* Disabled by default */
#define TF_COMMON                                                              0
#define TF_GENERIC_M                                                           0
#define TF_GENERIC_CLIENT_M                                                    0
#define TF_SENSOR_M                                                            0
#define TF_LIGHT_M                                                             0
#define TF_LIGHT_CLIENT_M                                                      0
#define TF_LIGHT_LC_M                                                          0
#define TF_VENDOR_M                                                            0
#define TF_CONFIG_CLIENT_M                                                     0
#define TF_NEIGHBOUR                                                           0
#define TF_MEMORY                                                              0
#define TF_BEACON                                                              0
#define TF_SERIAL_CTRL                                                         0

/*******************************************************************************
*** Following section helps to define Device Name during Provisioning  *********
*******************************************************************************/

#define DEVICE_NAME_SIZE                                                      11
#define DEVICE_NAME                  'S','T',' ','B','L','E',' ','M','e','s','h'

/*******************************************************************************
*** Following section helps to select right configuration of Models  ***********
*******************************************************************************/
/******************************************************************************/
/* Define the following Macros to enable the usage of the                     */
/* Server Generic Models                                                      */
/* Definition is a bitmap of 3 bits: bit 2 element 3                          */ 
/*                                   bit 1 element 2                          */
/*                                   bit 0 element 1                          */
/* Example: 6 means Model enabled in element 2 and 3                          */
/******************************************************************************/

/* Define the following Macros to enable the usage of the Server Generic Models  */
#define ENABLE_GENERIC_MODEL_SERVER_ONOFF                                    (1)
//#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

/* Define the following Macros to enable the usage of the Client Generic Models  */
//#define ENABLE_GENERIC_MODEL_CLIENT_ONOFF                                    (1)
//#define ENABLE_GENERIC_MODEL_CLIENT_LEVEL                                    (1)
//#define ENABLE_GENERIC_MODEL_CLIENT_POWER_ONOFF                              (1)
//#define ENABLE_GENERIC_MODEL_CLIENT_DEFAULT_TRANSITION_TIME                  (1)

/* 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  */
/* Definition is a bitmap of 3 bits: bit 2 element 3                          */ 
/*                                   bit 1 element 2                          */
/*                                   bit 0 element 1                          */
/* Example: 6 means Model enabled in element 2 and 3                          */
/******************************************************************************/

#define ENABLE_LIGHT_MODEL_SERVER_LIGHTNESS                                  (1)
//#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 

//#define ENABLE_LIGHT_MODEL_CLIENT_LIGHTNESS                                  (1)
//#define ENABLE_LIGHT_MODEL_CLIENT_CTL                                        (1)
//#define ENABLE_LIGHT_MODEL_CLIENT_HSL                                        (1)

/* 
   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 ENABLE_LIGHT_MODEL_CLIENT_LC                                         (1)

/******************************************************************************/
/* Define the following Macros to enable the usage of the Sensor Models  */
/* Definition is a bitmap of 3 bits: bit 2 element 3                          */ 
/*                                   bit 1 element 2                          */
/*                                   bit 0 element 1                          */
/* Example: 6 means Model enabled in element 2 and 3                          */
/******************************************************************************/

//#define ENABLE_SENSOR_MODEL_SERVER                                           
//#define ENABLE_SENSOR_MODEL_SERVER_SETUP                                     

//#define ENABLE_SENSOR_MODEL_CLIENT                                           (1)

/******************************************************************************/
/* Define the following Macros to enable the usage of the time and            */
/* scene Models                                                               */
/* Definition is a bitmap of 3 bits: bit 2 element 3                          */ 
/*                                   bit 1 element 2                          */
/*                                   bit 0 element 1                          */
/* Example: 6 means Model enabled in element 2 and 3                          */
/******************************************************************************/

//#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  

/* Define the following Macros to enable the usage of the Client Generic Models  */
//#define ENABLE_CONFIG_MODEL_CLIENT                                          (1)

/******************************************************************************/
/*
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 VENDOR_CLIENT_MODEL_PUBLISH
//#define GENERIC_CLIENT_MODEL_PUBLISH  
//#define LIGHT_CLIENT_MODEL_PUBLISH


//#define ENABLE_MODEL_BINDING

/* Define the macros for the numbers of sensor present.*/
#define NUMBER_OF_SENSOR                                                       3
//#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

/* Macros defined for the number of bytes saved, 
   number of bytes dedicated for generic model and light model.
*/     
#define APP_NVM_GENERIC_MODEL_SIZE        16U
#define APP_NVM_LIGHT_MODEL_SIZE                                             32U
#define APP_NVM_MODEL_SIZE                                                   50U

      
/*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 

/* Pulse Width Modulation support for external LED control */
#define ENABLE_PWM_SUPPORT                                                     0

/* 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                          1
#define ENABLE_SERIAL_CONTROL              1
#define ENABLE_APPLI_TEST                  0
      
/*******************************************************************************
*** Following section helps to configure the Application of Mesh     ***********
*******************************************************************************/

#define APPLICATION_NUMBER_OF_ELEMENTS                                         1
#define APPLICATION_SIG_MODELS_MAX_COUNT                                      20
#define APPLICATION_VENDOR_MODELS_MAX_COUNT                                    2
      

/* 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
      
      
/*
* Friend node receive window size is 50 ms
*/

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

/* 
* Friend node message queue is 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_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

#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) \
    && !defined (ENABLE_GENERIC_MODEL_SERVER)
 #define ENABLE_GENERIC_MODEL_SERVER                                         (1)
#endif      

#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) \
    && !defined (GENERIC_SERVER_MODEL_ADD_CONFIGURATION)
 #define GENERIC_SERVER_MODEL_ADD_CONFIGURATION                              (1)
      
#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) \
    && !defined (ENABLE_LIGHT_MODEL_SERVER)
  #define  ENABLE_LIGHT_MODEL_SERVER                                         (1)
#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 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 */