1 #ifndef _PICO_BTSTACK_BTSTACK_CONFIG_H 2 #define _PICO_BTSTACK_BTSTACK_CONFIG_H 3 4 // BTstack features that can be enabled 5 #define ENABLE_LE_PERIPHERAL 6 #define ENABLE_LE_CENTRAL 7 #define ENABLE_L2CAP_LE_CREDIT_BASED_FLOW_CONTROL_MODE 8 #define ENABLE_LOG_INFO 9 #define ENABLE_LOG_ERROR 10 #define ENABLE_PRINTF_HEXDUMP 11 12 // BTstack configuration. buffers, sizes, ... 13 #define HCI_OUTGOING_PRE_BUFFER_SIZE 4 14 #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) 15 #define HCI_ACL_CHUNK_SIZE_ALIGNMENT 4 16 #define MAX_NR_AVDTP_CONNECTIONS 1 17 #define MAX_NR_AVDTP_STREAM_ENDPOINTS 1 18 #define MAX_NR_AVRCP_CONNECTIONS 2 19 #define MAX_NR_BNEP_CHANNELS 1 20 #define MAX_NR_BNEP_SERVICES 1 21 #define MAX_NR_BTSTACK_LINK_KEY_DB_MEMORY_ENTRIES 2 22 #define MAX_NR_GATT_CLIENTS 1 23 #define MAX_NR_HCI_CONNECTIONS 2 24 #define MAX_NR_HFP_CONNECTIONS 1 25 #define MAX_NR_L2CAP_CHANNELS 4 26 #define MAX_NR_L2CAP_SERVICES 3 27 #define MAX_NR_RFCOMM_CHANNELS 1 28 #define MAX_NR_RFCOMM_MULTIPLEXERS 1 29 #define MAX_NR_RFCOMM_SERVICES 1 30 #define MAX_NR_SERVICE_RECORD_ITEMS 4 31 #define MAX_NR_SM_LOOKUP_ENTRIES 3 32 #define MAX_NR_WHITELIST_ENTRIES 1 33 34 #define MAX_NR_LE_DEVICE_DB_ENTRIES 4 35 36 // Limit number of ACL/SCO Buffer to use by stack to avoid cyw43 shared bus overrun 37 #define MAX_NR_CONTROLLER_ACL_BUFFERS 3 38 #define MAX_NR_CONTROLLER_SCO_PACKETS 3 39 40 // Enable and configure HCI Controller to Host Flow Control to avoid cyw43 shared bus overrun 41 #define ENABLE_HCI_CONTROLLER_TO_HOST_FLOW_CONTROL 42 #define HCI_HOST_ACL_PACKET_LEN 1024 43 #define HCI_HOST_ACL_PACKET_NUM 3 44 #define HCI_HOST_SCO_PACKET_LEN 120 45 #define HCI_HOST_SCO_PACKET_NUM 3 46 47 // Link Key DB and LE Device DB using TLV on top of Flash Sector interface 48 #define NVM_NUM_DEVICE_DB_ENTRIES 16 49 #define NVM_NUM_LINK_KEYS 16 50 51 // We don't give btstack a malloc, so use a fixed-size ATT DB. 52 #define MAX_ATT_DB_SIZE 512 53 54 // BTstack HAL configuration 55 #define HAVE_EMBEDDED_TIME_MS 56 57 // map btstack_assert onto Pico SDK assert() 58 #define HAVE_ASSERT 59 60 // Some USB dongles take longer to respond to HCI reset (e.g. BCM20702A). 61 #define HCI_RESET_RESEND_TIMEOUT_MS 1000 62 63 #define ENABLE_SOFTWARE_AES128 64 #define ENABLE_MICRO_ECC_FOR_LE_SECURE_CONNECTIONS 65 66 #define HAVE_BTSTACK_STDIN 67 68 // To get the audio demos working even with HCI dump at 115200, this truncates long ACL packetws 69 //#define HCI_DUMP_STDOUT_MAX_SIZE_ACL 100 70 71 #define ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE 72 73 #endif // MICROPY_INCLUDED_EXTMOD_BTSTACK_BTSTACK_CONFIG_H 74