Skip to content

Commit

Permalink
Merge branch 'feat/optimize_bt_porting_hci_0628_5.0' into 'release/v5.0'
Browse files Browse the repository at this point in the history
Feat/optimize bt porting hci 0628 5.0

See merge request espressif/esp-idf!32130
  • Loading branch information
jack0c committed Jul 17, 2024
2 parents 01ac18f + 4569090 commit 8d86ea0
Show file tree
Hide file tree
Showing 26 changed files with 2,659 additions and 197 deletions.
13 changes: 11 additions & 2 deletions components/bt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ if(CONFIG_BT_ENABLED)
list(APPEND srcs
"porting/npl/freertos/src/npl_os_freertos.c"
"porting/mem/os_msys_init.c"
"porting/transport/src/hci_transport.c"
)

list(APPEND include_dirs
Expand All @@ -491,9 +492,17 @@ if(CONFIG_BT_ENABLED)
porting/transport/include
)

if(CONFIG_BT_LE_HCI_INTERFACE_USE_UART)
if(CONFIG_BT_LE_HCI_INTERFACE_USE_RAM)
list(APPEND srcs
"porting/transport/uart/hci_uart.c"
"porting/transport/driver/vhci/hci_driver_standard.c"
)
elseif(CONFIG_BT_LE_HCI_INTERFACE_USE_UART)
list(APPEND srcs
"porting/transport/driver/common/hci_driver_util.c"
"porting/transport/driver/common/hci_driver_h4.c"
"porting/transport/driver/common/hci_driver_mem.c"
"porting/transport/driver/uart/hci_driver_uart_config.c"
"porting/transport/driver/uart/hci_driver_uart.c"
)
endif()
endif()
Expand Down
30 changes: 22 additions & 8 deletions components/bt/controller/esp32c2/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
menu "HCI Config"

choice BT_LE_HCI_INTERFACE
prompt "Select HCI interface"
prompt "HCI mode"
default BT_LE_HCI_INTERFACE_USE_RAM

config BT_LE_HCI_INTERFACE_USE_RAM
bool "ram"
bool "VHCI"
help
Use RAM as HCI interface
config BT_LE_HCI_INTERFACE_USE_UART
bool "uart"
bool "UART(H4)"
help
Use UART as HCI interface
endchoice
Expand Down Expand Up @@ -73,12 +73,26 @@ menu "HCI Config"
UART_PARITY_ODD
endchoice

config BT_LE_HCI_UART_TASK_STACK_SIZE
int "HCI uart task stack size"
depends on BT_LE_HCI_INTERFACE_USE_UART
default 1000
config BT_LE_HCI_UART_RX_BUFFER_SIZE
int "The size of rx ring buffer memory"
depends on !BT_LE_HCI_INTERFACE_USE_RAM
default 512
help
The size of rx ring buffer memory

config BT_LE_HCI_UART_TX_BUFFER_SIZE
int "The size of tx ring buffer memory"
depends on !BT_LE_HCI_INTERFACE_USE_RAM
default 256
help
The size of tx ring buffer memory

config BT_LE_HCI_TRANS_TASK_STACK_SIZE
int "HCI transport task stack size"
depends on !BT_LE_HCI_INTERFACE_USE_RAM
default 1024
help
Set the size of uart task stack
This configures stack size of hci transport task
endmenu

config BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT
Expand Down
Loading

0 comments on commit 8d86ea0

Please sign in to comment.