Kconfig 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. # Kconfig file for package BTSTACK
  2. menuconfig PKG_USING_BTSTACK
  3. select RT_USING_LIBC if RT_VER_NUM < 0x40100
  4. select RT_USING_POSIX if RT_VER_NUM < 0x40100
  5. select RT_USING_POSIX_FS if RT_VER_NUM >= 0x40100
  6. select RT_USING_PTHREADS
  7. select RT_USING_POSIX_TERMIOS
  8. select RT_USING_POSIX_SELECT if RT_VER_NUM >=0x50200
  9. select RT_USING_FAL if RT_VER_NUM >=0x50200
  10. bool "BTSTACK: embedded btstack"
  11. default n
  12. if PKG_USING_BTSTACK
  13. if RT_VER_NUM < 0x50200
  14. config _GNU_SOURCE
  15. int
  16. default 1
  17. config HAVE_DIRENT_STRUCTURE
  18. int
  19. default 1
  20. config HAVE_DIR_STRUCTURE
  21. int
  22. default 1
  23. endif
  24. config PKG_BTSTACK_PATH
  25. string
  26. default "/packages/iot/btstack"
  27. if PKG_BTSTACK_VER_NUM >= 0x10000
  28. menu "BTSTACK stack HARDWARE config"
  29. config BTSTACK_BT_RESET_PIN
  30. int "btstack pin value (port-a)*16+pin for stm32 "
  31. default 139 if SOC_STM32H750_ARTPI
  32. default 55 if BOARD_SERIES_STM32_NUCLEO_144
  33. config BTSTACK_BT_UART_PORT_DEV_NAME
  34. string "The device name of the uart port"
  35. default "/dev/uart3" if SOC_STM32H750_ARTPI
  36. default "/dev/uart2" if BOARD_SERIES_STM32_NUCLEO_144
  37. config BTSTACK_BT_PATCH_NAME
  38. string "The patch file name of device"
  39. default "/dev/bt_image" if SOC_STM32H750_ARTPI
  40. default "BCM43430A1.hcd" if BOARD_SERIES_STM32_NUCLEO_144
  41. endmenu
  42. # btstack office config
  43. menu "BTSTACK stack config"
  44. config ENABLE_LOG_ERROR
  45. bool "btstack error log support"
  46. default y
  47. help
  48. This option log error support.
  49. config ENABLE_LOG_INFO
  50. bool "btstack info log support"
  51. default n
  52. help
  53. This option log info log support.
  54. config ENABLE_LOG_DEBUG
  55. bool "btstack debug log support"
  56. default n
  57. help
  58. This option debug info log support.
  59. config ENABLE_SDP_DES_DUMP
  60. bool "btstack SDP Dump DataElement support"
  61. default y
  62. endmenu
  63. menuconfig ENABLE_LE
  64. bool "BTSTACK BLE support"
  65. default n
  66. if ENABLE_LE
  67. config ENABLE_LE_PERIPHERAL
  68. bool "btstack LE peripheral support"
  69. default y
  70. config ENABLE_LE_CENTRAL
  71. bool "btstack LE central support"
  72. default n
  73. config ENABLE_LE_DATA_CHANNELS
  74. bool "btstack LE data channel support"
  75. default y
  76. config ENABLE_LE_DATA_LENGTH_EXTENSION
  77. bool "btstack LE data length extension"
  78. default n
  79. config ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
  80. bool "btstack L2CAP ERTM support"
  81. default n
  82. endif
  83. menuconfig ENABLE_CLASSIC
  84. bool "BTSTACK BR_EDR SUPPORT"
  85. default n
  86. if ENABLE_CLASSIC
  87. config NVM_NUM_LINK_KEYS
  88. int
  89. default 16
  90. config NVM_NUM_DEVICE_DB_ENTRIES
  91. int "btstack class device link support"
  92. default 16
  93. config HCI_INCOMING_PRE_BUFFER_SIZE
  94. int "HCI incomming pre in head BUFFER SIZE"
  95. default 14
  96. config HCI_ACL_PAYLOAD_SIZE
  97. int "HCI acl payload size"
  98. default 1695
  99. #HFP
  100. config ENABLE_HFP_WIDE_BAND_SPEECH
  101. bool "btstack class HFP WIDE BAND support"
  102. default n
  103. config PKG_BTSTACK_SBC_ENC
  104. bool "Bluetooth SBC encode support"
  105. default n
  106. help
  107. This option enables Bluetooth Audio ENCODE support.
  108. config PKG_BTSTACK_SBC_DEC
  109. bool "Bluetooth SBC encode decode support"
  110. default n
  111. help
  112. This option enables Bluetooth Audio DECODE support.
  113. config PKG_BTSTACK_CVSD
  114. bool "Bluetooth CVSD support"
  115. default n
  116. help
  117. This option enables Bluetooth CVSD support.
  118. config PKG_BTSTACK_AUDIO
  119. bool "Bluetooth audio support"
  120. default n
  121. help
  122. This option enables Bluetooth audio support.
  123. config PKG_BTSTACK_SDP_CLIENT
  124. bool "Bluetooth SDP CLIENT support"
  125. default n
  126. help
  127. This option enables Bluetooth SDP client support.
  128. config PKG_BTSTACK_HFP_AUDIO
  129. bool "Bluetooth CVSD support"
  130. default n
  131. select PKG_BTSTACK_CVSD
  132. select PKG_BTSTACK_SBC_DEC
  133. select PKG_BTSTACK_SBC_ENC
  134. select PKG_BTSTACK_SDP_CLIENT
  135. select PKG_BTSTACK_AUDIO
  136. help
  137. This option enables Bluetooth HFP support.
  138. endif
  139. menuconfig ENABLE_MESH
  140. bool "BTSTACK Mesh SUPPORT"
  141. default n
  142. if ENABLE_MESH
  143. config ENABLE_MESH_ADV_BEARER
  144. bool "support the adv bear"
  145. default y
  146. config ENABLE_MESH_GATT_BEARER
  147. bool "support the gatt bear"
  148. default y
  149. config ENABLE_MESH_PB_ADV
  150. bool "support the gatt bear"
  151. default y
  152. config ENABLE_MESH_PB_GATT
  153. bool "provisioner gatt"
  154. default y
  155. config ENABLE_MESH_PROXY_SERVER
  156. bool "provisioner server"
  157. default y
  158. config ENABLE_MESH_PROVISIONER
  159. bool "provisioner server"
  160. default y
  161. config MAX_NR_MESH_TRANSPORT_KEYS
  162. int
  163. default 16
  164. config MAX_NR_MESH_VIRTUAL_ADDRESSES
  165. int
  166. default 16
  167. config MAX_NR_MESH_SUBNETS
  168. int
  169. default 2
  170. config MAX_NR_MESH_NETWORK_KEYS
  171. int
  172. default 3
  173. endif
  174. menuconfig PKG_BTSTACK_SMP
  175. bool "BTSTACK SMP SUPPORT"
  176. default n
  177. if PKG_BTSTACK_SMP
  178. config ENABLE_ECC_P256
  179. bool
  180. default y
  181. endif
  182. # example
  183. choice
  184. prompt "BTSTACK example select"
  185. default PKG_BTSTACK_SAMPLE_LE_COUNTER
  186. help
  187. select the BTSTACK samples
  188. config PKG_BTSTACK_SAMPLE_DISABLE
  189. bool "Not enable sample"
  190. config PKG_BTSTACK_SAMPLE_LE_BLUFI_SERVER
  191. bool "[LE_SRV] rtthread blufi server"
  192. select ENABLE_LE
  193. config PKG_BTSTACK_SAMPLE_LE_COUNTER
  194. bool "[LE_SRV] BLE peripheral le counter"
  195. select ENABLE_LE
  196. select ENABLE_LE_PERIPHERAL
  197. config PKG_BTSTACK_SAMPLE_LE_DATA_CHANNEL_SERVER
  198. bool "[LE_SRV] BLE peripheral le data channel server"
  199. select ENABLE_LE
  200. select ENABLE_LE_PERIPHERAL
  201. config PKG_BTSTACK_SAMPLE_LE_STREAMER
  202. bool "[LE_SRV] Nordic le streamer server"
  203. select ENABLE_LE
  204. select ENABLE_LE_PERIPHERAL
  205. config PKG_BTSTACK_SAMPLE_NORDIC_LE_COUNTER
  206. bool "[LE_SRV] Nordic le counter server"
  207. select ENABLE_LE
  208. select ENABLE_LE_PERIPHERAL
  209. config PKG_BTSTACK_SAMPLE_UBLOX_LE_COUNTER
  210. bool "[LE_SRV] Nordic spp ublox server"
  211. select ENABLE_LE
  212. select ENABLE_LE_PERIPHERAL
  213. config PKG_BTSTACK_SAMPLE_ATT_DELAYED_RESPONSE
  214. bool "[LE_SRV] gatt dealyed response"
  215. select ENABLE_LE
  216. select ENABLE_LE_PERIPHERAL
  217. config PKG_BTSTACK_SAMPLE_SM_PAIRING_PERIPHERAL
  218. bool "[LE_SMP_SRV] smp peripherals"
  219. select ENABLE_LE
  220. select ENABLE_LE_PERIPHERAL
  221. config PKG_BTSTACK_SAMPLE_GATT_STREAMER_PERIPHERAL
  222. bool "[LE_SRV] gatt streamer peipheral"
  223. select ENABLE_LE
  224. select ENABLE_LE_PERIPHERAL
  225. config PKG_BTSTACK_SAMPLE_ANCS_CLIENT_DEMO
  226. bool "[LE_SRV] ancs_client_demo"
  227. select ENABLE_LE
  228. select ENABLE_LE_PERIPHERAL
  229. config PKG_BTSTACK_SAMPLE_HOGP_KEYBOARD_DEMO
  230. bool "[LE_SRV_hogp] hogp keyboard demo"
  231. select ENABLE_LE
  232. select ENABLE_LE_PERIPHERAL
  233. config PKG_BTSTACK_SAMPLE_HOGP_MOUSER_DEMO
  234. bool "[LE_SRV_hogp] hogp mouser demo"
  235. select ENABLE_LE
  236. select ENABLE_LE_PERIPHERAL
  237. # MESH role
  238. config PKG_BTSTACK_SAMPLE_MESH_DEMO
  239. bool "[MESH_NODE] MESH DEMO"
  240. select ENABLE_LE
  241. select ENABLE_MESH
  242. select PKG_BTSTACK_SMP
  243. config PKG_BTSTACK_SAMPLE_TMALL_MESH_DEMO
  244. bool "[MESH_NODE] MESH DEMO ON TMALL ALIGEN"
  245. select ENABLE_LE
  246. select ENABLE_MESH
  247. select PKG_BTSTACK_SMP
  248. # dule mode le and bredr
  249. config PKG_BTSTACK_SAMPLE_SPP_GATT_COUNTER_DEMO
  250. bool "[EDR_LE_SLAVE] spp and gatt counter"
  251. select ENABLE_LE
  252. select ENABLE_CLASSIC
  253. config PKG_BTSTACK_SAMPLE_SPP_GATT_STREAMER_DEMO
  254. bool "[EDR_LE_SLAVE] spp and gatt streamer"
  255. select ENABLE_LE
  256. select ENABLE_CLASSIC
  257. config PKG_BTSTACK_SAMPLE_SPP_COUNTER_DEMO
  258. bool "[EDR_SPP_SLAVE] spp counter"
  259. select ENABLE_CLASSIC
  260. config PKG_BTSTACK_SAMPLE_SPP_STREAMER_DEMO
  261. bool "[EDR_SPP_SLAVE] spp streamer"
  262. select ENABLE_CLASSIC
  263. # classic example
  264. config PKG_BTSTACK_SAMPLE_HFP_HF_DEMO
  265. bool "[EDR_HFP_SLAVE] hfp handsfree demo"
  266. select ENABLE_CLASSIC
  267. select PKG_BTSTACK_HFP_AUDIO
  268. select PKG_BTSTACK_AUDIO
  269. config PKG_BTSTACK_SAMPLE_HFP_AG_DEMO
  270. bool "[EDR_HFP_MASTER] hfp AG demo"
  271. select ENABLE_CLASSIC
  272. select PKG_BTSTACK_HFP_AUDIO
  273. select PKG_BTSTACK_AUDIO
  274. config PKG_BTSTACK_SAMPLE_HSP_HS_DEMO
  275. bool "[EDR_HSP_SLAVE] hfp headset demo"
  276. select ENABLE_CLASSIC
  277. select PKG_BTSTACK_HFP_AUDIO
  278. select PKG_BTSTACK_AUDIO
  279. config PKG_BTSTACK_SAMPLE_HSP_AG_DEMO
  280. bool "[EDR_HSP_MASTER] hfp ag demo"
  281. select ENABLE_CLASSIC
  282. select PKG_BTSTACK_HFP_AUDIO
  283. endchoice
  284. endif
  285. # Using HM package
  286. config PKG_BTSTACK_USING_HM
  287. bool "Using HM package"
  288. default n
  289. # btstack config
  290. choice
  291. prompt "Version"
  292. default PKG_USING_BTSTACK_V100
  293. help
  294. Select the package version
  295. config PKG_USING_BTSTACK_V001
  296. bool "v0.0.1"
  297. config PKG_USING_BTSTACK_V100
  298. bool "v1.0.0"
  299. config PKG_USING_BTSTACK_LATEST_VERSION
  300. bool "latest"
  301. endchoice
  302. config PKG_BTSTACK_VER_NUM
  303. hex
  304. default 0x99999 if PKG_USING_BTSTACK_LATEST_VERSION
  305. default 0x10000 if PKG_USING_BTSTACK_V100
  306. default 0x00001 if PKG_USING_BTSTACK_V001
  307. config PKG_BTSTACK_VER
  308. string
  309. default "v0.0.1" if PKG_USING_BTSTACK_V001
  310. default "v1.0.0" if PKG_USING_BTSTACK_V100
  311. default "latest" if PKG_USING_BTSTACK_LATEST_VERSION
  312. endif