xref: /btstack/port/esp32/components/btstack/include/btstack_config.h (revision 75c13281d4abd251a82f93f4cf71a1833c518bde)
1 //
2 // btstack_config.h for esp32 port
3 //
4 
5 #ifndef __BTSTACK_CONFIG
6 #define __BTSTACK_CONFIG
7 
8 // Port related features
9 #define HAVE_EMBEDDED_TIME_MS
10 #define HAVE_MALLOC
11 #define HAVE_BTSTACK_STDIN
12 #define HAVE_FREERTOS_TASK_NOTIFICATIONS
13 #define HAVE_FREERTOS_INCLUDE_PREFIX
14 
15 // BTstack features that can be enabled
16 #define ENABLE_BLE
17 #define ENABLE_CLASSIC
18 #define ENABLE_LE_PERIPHERAL
19 #define ENABLE_LE_CENTRAL
20 #define ENABLE_LE_DATA_CHANNELS
21 #define ENABLE_LE_DATA_LENGTH_EXTENSION
22 #define ENABLE_LE_SECURE_CONNECTIONS
23 #define ENABLE_ATT_DELAYED_RESPONSE
24 // ESP32 supports ECDH HCI Commands, but micro-ecc lib is already provided anyway
25 #define ENABLE_MICRO_ECC_FOR_LE_SECURE_CONNECTIONS
26 #define ENABLE_SCO_OVER_HCI
27 #define ENABLE_LOG_ERROR
28 #define ENABLE_LOG_INFO
29 // #define ENABLE_LOG_DEBUG
30 
31 // BTstack configuration. buffers, sizes, ...
32 #define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
33 
34 // HCI Controller to Host Flow Control
35 #define ENABLE_HCI_CONTROLLER_TO_HOST_FLOW_CONTROL
36 
37 // Interal ring buffer: 21 kB
38 #define HCI_HOST_ACL_PACKET_NUM 20
39 #define HCI_HOST_ACL_PACKET_LEN 1024
40 #define HCI_HOST_SCO_PACKET_NUM 10
41 #define HCI_HOST_SCO_PACKET_LEN 60
42 
43 // Link Key DB and LE Device DB using TLV on top of Flash Sector interface
44 #define NVM_NUM_LINK_KEYS 16
45 #define NVM_NUM_DEVICE_DB_ENTRIES 16
46 
47 
48 // Mesh Configuration
49 #define ENABLE_MESH
50 #define ENABLE_MESH_ADV_BEARER
51 #define ENABLE_MESH_GATT_BEARER
52 #define ENABLE_MESH_PB_ADV
53 #define ENABLE_MESH_PB_GATT
54 #define ENABLE_MESH_PROXY_SERVER
55 #define ENABLE_MESH_PROVISIONER
56 
57 #define MAX_NR_MESH_TRANSPORT_KEYS    16
58 #define MAX_NR_MESH_VIRTUAL_ADDRESSES 16
59 #define MAX_NR_MESH_SUBNETS            2
60 
61 // allow for one NetKey update
62 #define MAX_NR_MESH_NETWORK_KEYS      (MAX_NR_MESH_SUBNETS+1)
63 
64 #endif
65