Skip to content

Commit 2c19bc6

Browse files
authored
Merge branch 'espressif:release/v5.2' into release/v5.2
2 parents 13ae434 + 3883a17 commit 2c19bc6

File tree

168 files changed

+6379
-1808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+6379
-1808
lines changed

components/bt/CMakeLists.txt

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ if(CONFIG_BT_ENABLED)
110110
common/btc/include
111111
common/include
112112
porting/mem/
113+
porting/include
113114
)
114115
list(APPEND include_dirs ${common_include_dirs})
115116

@@ -566,29 +567,51 @@ if(CONFIG_BT_ENABLED)
566567

567568

568569
if(CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT)
570+
list(APPEND srcs
571+
"porting/npl/freertos/src/npl_os_freertos.c"
572+
"porting/mem/os_msys_init.c"
573+
"porting/transport/src/hci_transport.c"
574+
)
575+
576+
if(CONFIG_BT_CONTROLLER_DISABLED)
569577
list(APPEND srcs
570-
"porting/npl/freertos/src/npl_os_freertos.c"
571-
"porting/mem/os_msys_init.c"
578+
"host/nimble/nimble/porting/nimble/src/hal_uart.c"
572579
)
573-
574-
if(CONFIG_BT_CONTROLLER_DISABLED)
580+
elseif(CONFIG_BT_LE_HCI_INTERFACE_USE_RAM)
581+
if(CONFIG_BT_NIMBLE_ENABLED)
575582
list(APPEND srcs
576-
"host/nimble/nimble/porting/nimble/src/hal_uart.c"
577-
)
583+
"porting/transport/driver/vhci/hci_driver_nimble.c"
584+
"host/nimble/nimble/nimble/transport/esp_ipc/src/hci_esp_ipc.c"
585+
)
586+
else()
587+
list(APPEND srcs
588+
"porting/transport/driver/vhci/hci_driver_standard.c"
589+
)
578590
endif()
579-
list(APPEND include_dirs
580-
porting/include
581-
porting/npl/freertos/include
582-
porting/transport/include
583-
)
584-
585-
if(CONFIG_BT_LE_HCI_INTERFACE_USE_UART)
591+
elseif(CONFIG_BT_LE_HCI_INTERFACE_USE_UART)
586592
list(APPEND srcs
587-
"porting/transport/uart/hci_uart.c"
588-
)
593+
"porting/transport/driver/common/hci_driver_util.c"
594+
"porting/transport/driver/common/hci_driver_h4.c"
595+
"porting/transport/driver/common/hci_driver_mem.c"
596+
"porting/transport/driver/uart/hci_driver_uart_config.c"
597+
)
598+
if(CONFIG_BT_LE_UART_HCI_DMA_MODE)
599+
list(APPEND srcs
600+
"porting/transport/driver/uart/hci_driver_uart_dma.c"
601+
)
602+
else()
603+
list(APPEND srcs
604+
"porting/transport/driver/uart/hci_driver_uart.c"
605+
)
589606
endif()
590-
endif()
607+
endif()
591608

609+
list(APPEND include_dirs
610+
porting/include
611+
porting/npl/freertos/include
612+
porting/transport/include
613+
)
614+
endif()
592615

593616
if(NOT (CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS OR CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS))
594617
list(APPEND include_dirs
@@ -614,7 +637,6 @@ if(CONFIG_BT_ENABLED)
614637
if(CONFIG_BT_NIMBLE_ENABLED)
615638

616639
list(APPEND include_dirs
617-
618640
host/nimble/nimble/nimble/host/include
619641
host/nimble/nimble/nimble/include
620642
host/nimble/nimble/nimble/host/services/ans/include
@@ -718,10 +740,12 @@ if(CONFIG_BT_ENABLED)
718740
"host/nimble/nimble/porting/npl/freertos/src/nimble_port_freertos.c"
719741
"host/nimble/port/src/nvs_port.c"
720742
)
743+
721744
list(APPEND include_dirs
722745
host/nimble/nimble/porting/nimble/include
723746
host/nimble/port/include
724747
host/nimble/nimble/nimble/transport/include
748+
host/nimble/nimble/nimble/include
725749
)
726750

727751
if(CONFIG_BT_CONTROLLER_DISABLED)
@@ -755,6 +779,7 @@ if(CONFIG_BT_ENABLED)
755779
if(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE AND CONFIG_BT_CONTROLLER_ENABLED)
756780
list(APPEND srcs
757781
"host/nimble/esp-hci/src/esp_nimble_hci.c"
782+
"host/nimble/nimble/nimble/transport/esp_ipc_legacy/src/hci_esp_ipc_legacy.c"
758783
)
759784
list(APPEND include_dirs ${nimble_hci_include_dirs})
760785
endif()

components/bt/controller/esp32c2/Kconfig.in

Lines changed: 99 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
menu "HCI Config"
33

44
choice BT_LE_HCI_INTERFACE
5-
prompt "Select HCI interface"
5+
prompt "HCI mode"
66
default BT_LE_HCI_INTERFACE_USE_RAM
77

88
config BT_LE_HCI_INTERFACE_USE_RAM
9-
bool "ram"
9+
bool "VHCI"
1010
help
1111
Use RAM as HCI interface
1212
config BT_LE_HCI_INTERFACE_USE_UART
13-
bool "uart"
13+
bool "UART(H4)"
1414
help
1515
Use UART as HCI interface
1616
endchoice
@@ -73,12 +73,26 @@ menu "HCI Config"
7373
UART_PARITY_ODD
7474
endchoice
7575

76-
config BT_LE_HCI_UART_TASK_STACK_SIZE
77-
int "HCI uart task stack size"
78-
depends on BT_LE_HCI_INTERFACE_USE_UART
79-
default 1000
76+
config BT_LE_HCI_UART_RX_BUFFER_SIZE
77+
int "The size of rx ring buffer memory"
78+
depends on !BT_LE_HCI_INTERFACE_USE_RAM
79+
default 512
8080
help
81-
Set the size of uart task stack
81+
The size of rx ring buffer memory
82+
83+
config BT_LE_HCI_UART_TX_BUFFER_SIZE
84+
int "The size of tx ring buffer memory"
85+
depends on !BT_LE_HCI_INTERFACE_USE_RAM
86+
default 256
87+
help
88+
The size of tx ring buffer memory
89+
90+
config BT_LE_HCI_TRANS_TASK_STACK_SIZE
91+
int "HCI transport task stack size"
92+
depends on !BT_LE_HCI_INTERFACE_USE_RAM
93+
default 1024
94+
help
95+
This configures stack size of hci transport task
8296
endmenu
8397

8498
config BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT
@@ -280,6 +294,24 @@ config BT_LE_CONTROLLER_LOG_DUMP_ONLY
280294
help
281295
Only operate in dump mode
282296

297+
config BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
298+
bool "Storage ble controller log to flash(experimental)"
299+
depends on !BT_LE_CONTROLLER_LOG_DUMP_ONLY
300+
depends on BT_LE_CONTROLLER_LOG_ENABLED
301+
default n
302+
help
303+
Storage ble controller log to flash.
304+
305+
config BT_LE_CONTROLLER_LOG_PARTITION_SIZE
306+
int "size of ble controller log partition(Multiples of 4K)"
307+
depends on BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
308+
default 65536
309+
help
310+
The size of ble controller log partition shall be a multiples of 4K.
311+
The name of log partition shall be "bt_ctrl_log".
312+
The partition type shall be ESP_PARTITION_TYPE_DATA.
313+
The partition sub_type shall be ESP_PARTITION_SUBTYPE_ANY.
314+
283315
config BT_LE_LOG_CTRL_BUF1_SIZE
284316
int "size of the first BLE controller LOG buffer"
285317
depends on BT_LE_CONTROLLER_LOG_ENABLED
@@ -526,3 +558,62 @@ config BT_LE_ROLE_OBSERVER_ENABLE
526558
default y
527559
help
528560
Enable observer role function.
561+
562+
choice BT_LE_DFT_TX_POWER_LEVEL_DBM
563+
prompt "BLE default Tx power level(dBm)"
564+
default BT_LE_DFT_TX_POWER_LEVEL_P9
565+
help
566+
Specify default Tx power level(dBm).
567+
config BT_LE_DFT_TX_POWER_LEVEL_N24
568+
bool "-24dBm"
569+
config BT_LE_DFT_TX_POWER_LEVEL_N21
570+
bool "-21dBm"
571+
config BT_LE_DFT_TX_POWER_LEVEL_N18
572+
bool "-18dBm"
573+
config BT_LE_DFT_TX_POWER_LEVEL_N15
574+
bool "-15dBm"
575+
config BT_LE_DFT_TX_POWER_LEVEL_N12
576+
bool "-12dBm"
577+
config BT_LE_DFT_TX_POWER_LEVEL_N9
578+
bool "-9dBm"
579+
config BT_LE_DFT_TX_POWER_LEVEL_N6
580+
bool "-6dBm"
581+
config BT_LE_DFT_TX_POWER_LEVEL_N3
582+
bool "-3dBm"
583+
config BT_LE_DFT_TX_POWER_LEVEL_N0
584+
bool "0dBm"
585+
config BT_LE_DFT_TX_POWER_LEVEL_P3
586+
bool "+3dBm"
587+
config BT_LE_DFT_TX_POWER_LEVEL_P6
588+
bool "+6dBm"
589+
config BT_LE_DFT_TX_POWER_LEVEL_P9
590+
bool "+9dBm"
591+
config BT_LE_DFT_TX_POWER_LEVEL_P12
592+
bool "+12dBm"
593+
config BT_LE_DFT_TX_POWER_LEVEL_P15
594+
bool "+15dBm"
595+
config BT_LE_DFT_TX_POWER_LEVEL_P18
596+
bool "+18dBm"
597+
config BT_LE_DFT_TX_POWER_LEVEL_P20
598+
bool "+20dBm"
599+
endchoice
600+
601+
config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
602+
int
603+
default -24 if BT_LE_DFT_TX_POWER_LEVEL_N24
604+
default -21 if BT_LE_DFT_TX_POWER_LEVEL_N21
605+
default -18 if BT_LE_DFT_TX_POWER_LEVEL_N18
606+
default -15 if BT_LE_DFT_TX_POWER_LEVEL_N15
607+
default -12 if BT_LE_DFT_TX_POWER_LEVEL_N12
608+
default -9 if BT_LE_DFT_TX_POWER_LEVEL_N9
609+
default -6 if BT_LE_DFT_TX_POWER_LEVEL_N6
610+
default -3 if BT_LE_DFT_TX_POWER_LEVEL_N3
611+
default 0 if BT_LE_DFT_TX_POWER_LEVEL_N0
612+
default 3 if BT_LE_DFT_TX_POWER_LEVEL_P3
613+
default 6 if BT_LE_DFT_TX_POWER_LEVEL_P6
614+
default 9 if BT_LE_DFT_TX_POWER_LEVEL_P9
615+
default 12 if BT_LE_DFT_TX_POWER_LEVEL_P12
616+
default 15 if BT_LE_DFT_TX_POWER_LEVEL_P15
617+
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
618+
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
619+
default 0

0 commit comments

Comments
 (0)