btstack_config.h 2.3 KB

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