xref: /nrf52832-nimble/packages/NimBLE-latest/porting/npl/rtthread/include/config/config.h (revision 042d53a763ad75cb1465103098bb88c245d95138)
1 /*
2  * SPDX-License-Identifier: Apache-2.0
3  *
4  * Date           Author       Notes
5  * 2018-12-29     ChenYong     first implementation
6  */
7 
8 #ifndef __NUMBLE_CONFIG_H__
9 #define __NUMBLE_CONFIG_H__
10 
11 #include <rtconfig.h>
12 
13 /**
14  * Bluetooth role support
15  */
16 #ifdef PKG_NIMBLE_ROLE_PERIPHERAL
17 #define MYNEWT_VAL_BLE_ROLE_PERIPHERAL           (1)
18 #endif
19 
20 #ifdef PKG_NIMBLE_ROLE_CENTRAL
21 #define MYNEWT_VAL_BLE_ROLE_CENTRAL              (1)
22 #endif
23 
24 #ifdef PKG_NIMBLE_ROLE_BROADCASTER
25 #define MYNEWT_VAL_BLE_ROLE_BROADCASTER          (1)
26 #endif
27 
28 #ifdef PKG_NIMBLE_ROLE_OBSERVER
29 #define MYNEWT_VAL_BLE_ROLE_OBSERVER             (1)
30 #endif
31 
32 #ifdef PKG_NIMBLE_MAX_CONNECTIONS
33 #define MYNEWT_VAL_BLE_MAX_CONNECTIONS           (PKG_NIMBLE_MAX_CONNECTIONS)
34 #endif
35 
36 #ifdef PKG_NIMBLE_MULTI_ADV_INSTANCES
37 #define MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES       (PKG_NIMBLE_MULTI_ADV_INSTANCES)
38 #endif
39 
40 #ifdef PKG_NIMBLE_WHITELIST
41 #define MYNEWT_VAL_BLE_WHITELIST                 (1)
42 #endif
43 
44 #ifdef PKG_NIMBLE_EXT_ADV
45 #define MYNEWT_VAL_BLE_EXT_ADV                   (1)
46 #endif
47 
48 #ifdef PKG_NIMBLE_EXT_ADV_MAX_SIZE
49 #define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE          (PKG_NIMBLE_EXT_ADV_MAX_SIZE)
50 #endif
51 
52 /**
53  * Host Stack Configuration
54  */
55 #ifdef PKG_NIMBLE_HOST_THREAD_STACK_SIZE
56 #define MYNEWT_VAL_BLE_HOST_THREAD_STACK_SIZE    (PKG_NIMBLE_HOST_THREAD_STACK_SIZE)
57 #endif
58 
59 #ifdef PKG_NIMBLE_HOST_THREAD_PRIORITY
60 #define MYNEWT_VAL_BLE_HOST_THREAD_PRIORITY      (PKG_NIMBLE_HOST_THREAD_PRIORITY)
61 #endif
62 
63 /**
64  * Mesh Configuration
65  */
66 #ifdef PKG_NIMBLE_MESH
67 #define MYNEWT_VAL_BLE_MESH                      (1)
68 #endif
69 
70 #ifdef PKG_NIMBLE_MESH_DEVICE_NAME
71 #define MYNEWT_VAL_BLE_MESH_DEVICE_NAME          PKG_NIMBLE_MESH_DEVICE_NAME
72 #endif
73 
74 #ifdef PKG_NIMBLE_MESH_ADV_THREAD_STACK_SIZE
75 #define MYNEWT_VAL_BLE_MESH_ADV_THREAD_STACK_SIZE (PKG_NIMBLE_MESH_ADV_THREAD_STACK_SIZE)
76 #endif
77 
78 #ifdef PKG_NIMBLE_MESH_ADV_THREAD_PRIORITY
79 #define MYNEWT_VAL_BLE_MESH_ADV_THREAD_PRIORITY  (PKG_NIMBLE_MESH_ADV_THREAD_PRIORITY)
80 #endif
81 
82 #ifdef PKG_NIMBLE_MESH_CFG_CLI
83 #define BLE_MESH_CFG_CLI                         (1)
84 #endif
85 
86 /**
87  * Controller Configuration
88  */
89 #ifdef PKG_NIMBLE_CTLR_THREAD_STACK_SIZE
90 #define MYNEWT_VAL_BLE_CTLR_THREAD_STACK_SIZE   (PKG_NIMBLE_CTLR_THREAD_STACK_SIZE)
91 #endif
92 
93 #ifdef PKG_NIMBLE_CTLR_THREAD_PRIORITY
94 #define MYNEWT_VAL_BLE_CTLR_THREAD_PRIORITY     (PKG_NIMBLE_CTLR_THREAD_PRIORITY)
95 #endif
96 
97 #ifdef PKG_NIMBLE_BSP_NRF52
98 #define MYNEWT_VAL_BSP_NRF52                     (1)
99 #endif
100 
101 #ifdef PKG_NIMBLE_BSP_NRF52840
102 #define MYNEWT_VAL_BSP_NRF52840                  (1)
103 #endif
104 
105 #endif
106