Skip to content

Commit 7d0657d

Browse files
authored
Merge branch 'espressif:release/v5.1' into release/v5.1
2 parents bb5b643 + f49f979 commit 7d0657d

File tree

199 files changed

+6378
-2531
lines changed

Some content is hidden

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

199 files changed

+6378
-2531
lines changed

components/bootloader_support/src/bootloader_random_esp32c6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void bootloader_random_enable(void)
5353

5454
// create patterns and set them in pattern table
5555
uint32_t pattern_one = (SAR2_CHANNEL << 2) | SAR2_ATTEN; // we want channel 9 with max attenuation
56-
uint32_t pattern_two = SAR1_ATTEN; // we want channel 0 with max attenuation, channel doesn't really matter here
56+
uint32_t pattern_two = (SAR2_CHANNEL << 2) | SAR1_ATTEN; // we want channel 9 with max attenuation
5757
uint32_t pattern_table = 0 | (pattern_two << 3 * PATTERN_BIT_WIDTH) | pattern_one << 2 * PATTERN_BIT_WIDTH;
5858
REG_WRITE(APB_SARADC_SAR_PATT_TAB1_REG, pattern_table);
5959

components/bt/CMakeLists.txt

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ if(CONFIG_BT_ENABLED)
4848
common/btc/include
4949
common/include
5050
porting/mem/
51+
porting/include
5152
)
5253
list(APPEND include_dirs
5354
common/api/include/api
@@ -488,29 +489,51 @@ if(CONFIG_BT_ENABLED)
488489

489490

490491
if(CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT)
492+
list(APPEND srcs
493+
"porting/npl/freertos/src/npl_os_freertos.c"
494+
"porting/mem/os_msys_init.c"
495+
"porting/transport/src/hci_transport.c"
496+
)
497+
498+
if(CONFIG_BT_CONTROLLER_DISABLED)
491499
list(APPEND srcs
492-
"porting/npl/freertos/src/npl_os_freertos.c"
493-
"porting/mem/os_msys_init.c"
500+
"host/nimble/nimble/porting/nimble/src/hal_uart.c"
494501
)
495-
496-
if(CONFIG_BT_CONTROLLER_DISABLED)
502+
elseif(CONFIG_BT_LE_HCI_INTERFACE_USE_RAM)
503+
if(CONFIG_BT_NIMBLE_ENABLED)
497504
list(APPEND srcs
498-
"host/nimble/nimble/porting/nimble/src/hal_uart.c"
499-
)
505+
"porting/transport/driver/vhci/hci_driver_nimble.c"
506+
"host/nimble/nimble/nimble/transport/esp_ipc/src/hci_esp_ipc.c"
507+
)
508+
else()
509+
list(APPEND srcs
510+
"porting/transport/driver/vhci/hci_driver_standard.c"
511+
)
500512
endif()
501-
list(APPEND include_dirs
502-
porting/include
503-
porting/npl/freertos/include
504-
porting/transport/include
505-
)
506-
507-
if(CONFIG_BT_LE_HCI_INTERFACE_USE_UART)
513+
elseif(CONFIG_BT_LE_HCI_INTERFACE_USE_UART)
508514
list(APPEND srcs
509-
"porting/transport/uart/hci_uart.c"
510-
)
515+
"porting/transport/driver/common/hci_driver_util.c"
516+
"porting/transport/driver/common/hci_driver_h4.c"
517+
"porting/transport/driver/common/hci_driver_mem.c"
518+
"porting/transport/driver/uart/hci_driver_uart_config.c"
519+
)
520+
if(CONFIG_BT_LE_UART_HCI_DMA_MODE)
521+
list(APPEND srcs
522+
"porting/transport/driver/uart/hci_driver_uart_dma.c"
523+
)
524+
else()
525+
list(APPEND srcs
526+
"porting/transport/driver/uart/hci_driver_uart.c"
527+
)
511528
endif()
512-
endif()
529+
endif()
513530

531+
list(APPEND include_dirs
532+
porting/include
533+
porting/npl/freertos/include
534+
porting/transport/include
535+
)
536+
endif()
514537

515538
if(NOT (CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS OR CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS))
516539
list(APPEND include_dirs
@@ -536,7 +559,6 @@ if(CONFIG_BT_ENABLED)
536559
if(CONFIG_BT_NIMBLE_ENABLED)
537560

538561
list(APPEND include_dirs
539-
540562
host/nimble/nimble/nimble/host/include
541563
host/nimble/nimble/nimble/include
542564
host/nimble/nimble/nimble/host/services/ans/include
@@ -640,10 +662,12 @@ if(CONFIG_BT_ENABLED)
640662
"host/nimble/nimble/porting/npl/freertos/src/nimble_port_freertos.c"
641663
"host/nimble/port/src/nvs_port.c"
642664
)
665+
643666
list(APPEND include_dirs
644667
host/nimble/nimble/porting/nimble/include
645668
host/nimble/port/include
646669
host/nimble/nimble/nimble/transport/include
670+
host/nimble/nimble/nimble/include
647671
)
648672

649673
if(CONFIG_BT_CONTROLLER_DISABLED)
@@ -677,6 +701,7 @@ if(CONFIG_BT_ENABLED)
677701
if(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE AND CONFIG_BT_CONTROLLER_ENABLED)
678702
list(APPEND srcs
679703
"host/nimble/esp-hci/src/esp_nimble_hci.c"
704+
"host/nimble/nimble/nimble/transport/esp_ipc_legacy/src/hci_esp_ipc_legacy.c"
680705
)
681706
list(APPEND include_dirs
682707
host/nimble/esp-hci/include

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
@@ -525,3 +557,62 @@ config BT_LE_ROLE_OBSERVER_ENABLE
525557
default y
526558
help
527559
Enable observer role function.
560+
561+
choice BT_LE_DFT_TX_POWER_LEVEL_DBM
562+
prompt "BLE default Tx power level(dBm)"
563+
default BT_LE_DFT_TX_POWER_LEVEL_P9
564+
help
565+
Specify default Tx power level(dBm).
566+
config BT_LE_DFT_TX_POWER_LEVEL_N24
567+
bool "-24dBm"
568+
config BT_LE_DFT_TX_POWER_LEVEL_N21
569+
bool "-21dBm"
570+
config BT_LE_DFT_TX_POWER_LEVEL_N18
571+
bool "-18dBm"
572+
config BT_LE_DFT_TX_POWER_LEVEL_N15
573+
bool "-15dBm"
574+
config BT_LE_DFT_TX_POWER_LEVEL_N12
575+
bool "-12dBm"
576+
config BT_LE_DFT_TX_POWER_LEVEL_N9
577+
bool "-9dBm"
578+
config BT_LE_DFT_TX_POWER_LEVEL_N6
579+
bool "-6dBm"
580+
config BT_LE_DFT_TX_POWER_LEVEL_N3
581+
bool "-3dBm"
582+
config BT_LE_DFT_TX_POWER_LEVEL_N0
583+
bool "0dBm"
584+
config BT_LE_DFT_TX_POWER_LEVEL_P3
585+
bool "+3dBm"
586+
config BT_LE_DFT_TX_POWER_LEVEL_P6
587+
bool "+6dBm"
588+
config BT_LE_DFT_TX_POWER_LEVEL_P9
589+
bool "+9dBm"
590+
config BT_LE_DFT_TX_POWER_LEVEL_P12
591+
bool "+12dBm"
592+
config BT_LE_DFT_TX_POWER_LEVEL_P15
593+
bool "+15dBm"
594+
config BT_LE_DFT_TX_POWER_LEVEL_P18
595+
bool "+18dBm"
596+
config BT_LE_DFT_TX_POWER_LEVEL_P20
597+
bool "+20dBm"
598+
endchoice
599+
600+
config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
601+
int
602+
default -24 if BT_LE_DFT_TX_POWER_LEVEL_N24
603+
default -21 if BT_LE_DFT_TX_POWER_LEVEL_N21
604+
default -18 if BT_LE_DFT_TX_POWER_LEVEL_N18
605+
default -15 if BT_LE_DFT_TX_POWER_LEVEL_N15
606+
default -12 if BT_LE_DFT_TX_POWER_LEVEL_N12
607+
default -9 if BT_LE_DFT_TX_POWER_LEVEL_N9
608+
default -6 if BT_LE_DFT_TX_POWER_LEVEL_N6
609+
default -3 if BT_LE_DFT_TX_POWER_LEVEL_N3
610+
default 0 if BT_LE_DFT_TX_POWER_LEVEL_N0
611+
default 3 if BT_LE_DFT_TX_POWER_LEVEL_P3
612+
default 6 if BT_LE_DFT_TX_POWER_LEVEL_P6
613+
default 9 if BT_LE_DFT_TX_POWER_LEVEL_P9
614+
default 12 if BT_LE_DFT_TX_POWER_LEVEL_P12
615+
default 15 if BT_LE_DFT_TX_POWER_LEVEL_P15
616+
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
617+
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
618+
default 0

0 commit comments

Comments
 (0)