esp-nimble-cpp 2.0.2
Loading...
Searching...
No Matches
nimconfig.h
Go to the documentation of this file.
1
8#pragma once
9
10#include "sdkconfig.h"
11#include "nimconfig_rename.h"
12
13#if defined(CONFIG_BT_ENABLED)
14
15// Allows cpp wrapper to select the correct include paths when using esp-idf
16#define CONFIG_NIMBLE_CPP_IDF
17
18/* Cannot use client without scan */
19#if defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL) && !defined(CONFIG_BT_NIMBLE_ROLE_OBSERVER)
20#define CONFIG_BT_NIMBLE_ROLE_OBSERVER
21#endif
22
23/* Cannot use server without advertise */
24#if defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL) && !defined(CONFIG_BT_NIMBLE_ROLE_BROADCASTER)
25#define CONFIG_BT_NIMBLE_ROLE_BROADCASTER
26#endif
27
28/* Enables the use of Arduino String class for attribute values */
29#if defined __has_include
30# if __has_include (<Arduino.h>)
31# define NIMBLE_CPP_ARDUINO_STRING_AVAILABLE
32# endif
33#endif
34
35#if CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED && !defined NDEBUG
36void nimble_cpp_assert(const char *file, unsigned line) __attribute((weak, noreturn));
37# define NIMBLE_ATT_VAL_FILE (__builtin_strrchr(__FILE__, '/') ? \
38 __builtin_strrchr (__FILE__, '/') + 1 : __FILE__)
39# define NIMBLE_CPP_DEBUG_ASSERT(cond) \
40 if (!(cond)) { \
41 nimble_cpp_assert(NIMBLE_ATT_VAL_FILE, __LINE__); \
42 }
43#else
44# define NIMBLE_CPP_DEBUG_ASSERT(cond) (void(0))
45#endif
46
47#endif /* CONFIG_BT_ENABLED */
48
49#ifdef _DOXYGEN_
50
52#define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 3
53
60#define CONFIG_NIMBLE_CPP_ATT_VALUE_TIMESTAMP_ENABLED 0
61
68#define CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH 20
69
71#define CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU 255
72
74#define CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME "nimble"
75
80#define CONFIG_BT_NIMBLE_LOG_LEVEL 5
81
86#define CONFIG_NIMBLE_CPP_LOG_LEVEL 0
87
91#define CONFIG_NIMBLE_CPP_ENABLE_RETURN_CODE_TEXT
92
96#define CONFIG_NIMBLE_CPP_ENABLE_GAP_EVENT_CODE_TEXT
97
101#define CONFIG_NIMBLE_CPP_ENABLE_ADVERTISMENT_TYPE_TEXT
102
104#define CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE 0x0
105
109#define CONFIG_BT_NIMBLE_ROLE_CENTRAL_DISABLED
110
114#define CONFIG_BT_NIMBLE_ROLE_OBSERVER_DISABLED
115
119#define CONFIG_BT_NIMBLE_ROLE_PERIPHERAL_DISABLED
120
124#define CONFIG_BT_NIMBLE_ROLE_BROADCASTER_DISABLED
125
127#define CONFIG_BT_NIMBLE_MAX_BONDS 3
128
130#define CONFIG_BT_NIMBLE_MAX_CCCDS 8
131
133#define CONFIG_BT_NIMBLE_RPA_TIMEOUT 900
134
141#define CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT 12
142
144#define CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL 1
145
147#define CONFIG_BT_NIMBLE_PINNED_TO_CORE 0
148
150#define CONFIG_BT_NIMBLE_TASK_STACK_SIZE 4096
151
152#endif // _DOXYGEN_