mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
change(bt/ble_log): deprecate legacy SPI log output module
Move ble_log_spi_out.c and ble_log_spi_out.h into a deprecated/ subdirectory under components/bt/common/ble_log/. Extract all BT_BLE_LOG_SPI_OUT_* Kconfig options into deprecated/Kconfig.in with an if-block to reduce depends-on repetition, sourced from ble_log/Kconfig.in inside a "Legacy SPI Log Output (Deprecated)" menu. Add mutual exclusion with BLE_LOG_ENABLED so that the legacy SPI Out and the new BLE Log Module cannot be enabled simultaneously. Update CMakeLists.txt source path and add deprecated/include to include dirs so existing callers are unaffected. The BLE Log Module's SPI Master DMA peripheral transport is the replacement.
This commit is contained in:
@@ -32,6 +32,7 @@ set(common_include_dirs
|
||||
common/btc/profile/esp/include
|
||||
common/hci_log/include
|
||||
common/ble_log/include
|
||||
common/ble_log/deprecated/include
|
||||
)
|
||||
|
||||
set(ble_mesh_include_dirs
|
||||
@@ -156,7 +157,7 @@ if(CONFIG_BT_ENABLED)
|
||||
"common/osi/osi.c"
|
||||
"common/osi/semaphore.c"
|
||||
"porting/mem/bt_osi_mem.c"
|
||||
"common/ble_log/ble_log_spi_out.c"
|
||||
"common/ble_log/deprecated/ble_log_spi_out.c"
|
||||
)
|
||||
|
||||
# BLE Log Module
|
||||
|
||||
@@ -47,191 +47,6 @@ menu "BLE Log"
|
||||
source "$IDF_PATH/components/bt/common/ble_log/Kconfig.in"
|
||||
endmenu
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
bool "Output ble logs to SPI bus (Experimental)"
|
||||
default n
|
||||
help
|
||||
Output ble logs to SPI bus
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_UL_TASK_BUF_SIZE
|
||||
int "SPI transaction buffer size for upper layer task logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default 512
|
||||
help
|
||||
SPI transaction buffer size for upper layer task logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
bool "Enable HCI log output to SPI"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default n
|
||||
help
|
||||
Enable logging of HCI packets to the SPI bus when BLE SPI log output is enabled.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HCI_BUF_SIZE
|
||||
int "SPI transaction buffer size for HCI logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for HCI logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HCI_TASK_CNT
|
||||
int "HCI task count"
|
||||
depends on BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
default 1
|
||||
help
|
||||
HCI task count
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HOST_ENABLED
|
||||
bool "Enable Host log output to SPI"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default n
|
||||
help
|
||||
This configuration applies to the logs of both Bluedroid Host and NimBLE Host.
|
||||
When BLE SPI log output is enabled, this option allows host logs to be transmitted via SPI.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HOST_BUF_SIZE
|
||||
int "SPI transaction buffer size for host logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_HOST_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for host logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HOST_TASK_CNT
|
||||
int "Host task count"
|
||||
depends on BT_BLE_LOG_SPI_OUT_HOST_ENABLED
|
||||
default 2
|
||||
help
|
||||
Host task count.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LL_ENABLED
|
||||
bool "Enable Controller log output to SPI"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
depends on BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
||||
default n
|
||||
help
|
||||
Enable controller log output to SPI bus.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LL_TASK_BUF_SIZE
|
||||
int "SPI transaction buffer size for lower layer task logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LL_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for lower layer task logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LL_ISR_BUF_SIZE
|
||||
int "SPI transaction buffer size for lower layer ISR logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LL_ENABLED
|
||||
default 512
|
||||
help
|
||||
SPI transaction buffer size for lower layer ISR logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LL_HCI_BUF_SIZE
|
||||
int "SPI transaction buffer size for lower layer HCI logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LL_ENABLED
|
||||
default 512
|
||||
help
|
||||
SPI transaction buffer size for upper layer HCI logs.
|
||||
There will be 2 SPI DMA buffers with the same size
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_MOSI_IO_NUM
|
||||
int "GPIO number of SPI MOSI"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default 0
|
||||
help
|
||||
GPIO number of SPI MOSI
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_SCLK_IO_NUM
|
||||
int "GPIO number of SPI SCLK"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default 1
|
||||
help
|
||||
GPIO number of SPI SCLK
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_CS_IO_NUM
|
||||
int "GPIO number of SPI CS"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default 2
|
||||
help
|
||||
GPIO number of SPI CS
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
|
||||
bool "Enable ble log & logic analyzer log time sync"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default y
|
||||
help
|
||||
Enable ble log & logic analyzer log time sync
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM
|
||||
int "GPIO number of SYNC IO"
|
||||
depends on BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
|
||||
default 3
|
||||
help
|
||||
GPIO number of SYNC IO
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
|
||||
bool "Enable periodic buffer flush out"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default n
|
||||
help
|
||||
Enable periodic buffer flush out
|
||||
Not recommended when SPI receiver is unavailable
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_FLUSH_TIMEOUT
|
||||
int "Buffer flush out period in unit of ms"
|
||||
depends on BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
|
||||
default 1000
|
||||
help
|
||||
Buffer flush out period in unit of ms
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LE_AUDIO_ENABLED
|
||||
bool "Enable LE Audio log output to SPI"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default n
|
||||
help
|
||||
Enable LE Audio log output to SPI
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LE_AUDIO_BUF_SIZE
|
||||
int "SPI transaction buffer size for LE Audio logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LE_AUDIO_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for LE Audio logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LE_AUDIO_TASK_CNT
|
||||
int "LE audio task count"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LE_AUDIO_ENABLED
|
||||
default 1
|
||||
help
|
||||
LE audio task count
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_MESH_ENABLED
|
||||
bool "Enable BLE mesh log output to SPI"
|
||||
depends on BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
default n
|
||||
help
|
||||
Enable BLE mesh log output to SPI
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_MESH_BUF_SIZE
|
||||
int "SPI transaction buffer size for BLE mesh logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_MESH_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for BLE mesh logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_MESH_TASK_CNT
|
||||
int "Mesh task count"
|
||||
depends on BT_BLE_LOG_SPI_OUT_MESH_ENABLED
|
||||
default 3
|
||||
help
|
||||
Mesh task count
|
||||
|
||||
config BT_LE_USED_MEM_STATISTICS_ENABLED
|
||||
bool "Enable used memory statistics"
|
||||
default n
|
||||
|
||||
@@ -243,3 +243,7 @@ if BLE_LOG_ENABLED
|
||||
source "$IDF_PATH/components/bt/common/ble_log/extension/log_compression/Kconfig.in"
|
||||
endmenu
|
||||
endif
|
||||
|
||||
menu "Legacy SPI Log Output (Deprecated - use BLE Log Module instead)"
|
||||
source "$IDF_PATH/components/bt/common/ble_log/deprecated/Kconfig.in"
|
||||
endmenu
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
config BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
bool "Output ble logs to SPI bus (Experimental)"
|
||||
depends on !BLE_LOG_ENABLED
|
||||
default n
|
||||
help
|
||||
Output ble logs to SPI bus
|
||||
|
||||
if BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
config BT_BLE_LOG_SPI_OUT_UL_TASK_BUF_SIZE
|
||||
int "SPI transaction buffer size for upper layer task logs"
|
||||
default 512
|
||||
help
|
||||
SPI transaction buffer size for upper layer task logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
bool "Enable HCI log output to SPI"
|
||||
default n
|
||||
help
|
||||
Enable logging of HCI packets to the SPI bus when BLE SPI log output is enabled.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HCI_BUF_SIZE
|
||||
int "SPI transaction buffer size for HCI logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for HCI logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HCI_TASK_CNT
|
||||
int "HCI task count"
|
||||
depends on BT_BLE_LOG_SPI_OUT_HCI_ENABLED
|
||||
default 1
|
||||
help
|
||||
HCI task count
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HOST_ENABLED
|
||||
bool "Enable Host log output to SPI"
|
||||
default n
|
||||
help
|
||||
This configuration applies to the logs of both Bluedroid Host and NimBLE Host.
|
||||
When BLE SPI log output is enabled, this option allows host logs to be transmitted via SPI.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HOST_BUF_SIZE
|
||||
int "SPI transaction buffer size for host logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_HOST_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for host logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_HOST_TASK_CNT
|
||||
int "Host task count"
|
||||
depends on BT_BLE_LOG_SPI_OUT_HOST_ENABLED
|
||||
default 2
|
||||
help
|
||||
Host task count.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LL_ENABLED
|
||||
bool "Enable Controller log output to SPI"
|
||||
depends on BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
||||
default n
|
||||
help
|
||||
Enable controller log output to SPI bus.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LL_TASK_BUF_SIZE
|
||||
int "SPI transaction buffer size for lower layer task logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LL_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for lower layer task logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LL_ISR_BUF_SIZE
|
||||
int "SPI transaction buffer size for lower layer ISR logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LL_ENABLED
|
||||
default 512
|
||||
help
|
||||
SPI transaction buffer size for lower layer ISR logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LL_HCI_BUF_SIZE
|
||||
int "SPI transaction buffer size for lower layer HCI logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LL_ENABLED
|
||||
default 512
|
||||
help
|
||||
SPI transaction buffer size for upper layer HCI logs.
|
||||
There will be 2 SPI DMA buffers with the same size
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_MOSI_IO_NUM
|
||||
int "GPIO number of SPI MOSI"
|
||||
default 0
|
||||
help
|
||||
GPIO number of SPI MOSI
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_SCLK_IO_NUM
|
||||
int "GPIO number of SPI SCLK"
|
||||
default 1
|
||||
help
|
||||
GPIO number of SPI SCLK
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_CS_IO_NUM
|
||||
int "GPIO number of SPI CS"
|
||||
default 2
|
||||
help
|
||||
GPIO number of SPI CS
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
|
||||
bool "Enable ble log & logic analyzer log time sync"
|
||||
default y
|
||||
help
|
||||
Enable ble log & logic analyzer log time sync
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM
|
||||
int "GPIO number of SYNC IO"
|
||||
depends on BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
|
||||
default 3
|
||||
help
|
||||
GPIO number of SYNC IO
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
|
||||
bool "Enable periodic buffer flush out"
|
||||
default n
|
||||
help
|
||||
Enable periodic buffer flush out
|
||||
Not recommended when SPI receiver is unavailable
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_FLUSH_TIMEOUT
|
||||
int "Buffer flush out period in unit of ms"
|
||||
depends on BT_BLE_LOG_SPI_OUT_FLUSH_TIMER_ENABLED
|
||||
default 1000
|
||||
help
|
||||
Buffer flush out period in unit of ms
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LE_AUDIO_ENABLED
|
||||
bool "Enable LE Audio log output to SPI"
|
||||
default n
|
||||
help
|
||||
Enable LE Audio log output to SPI
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LE_AUDIO_BUF_SIZE
|
||||
int "SPI transaction buffer size for LE Audio logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LE_AUDIO_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for LE Audio logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_LE_AUDIO_TASK_CNT
|
||||
int "LE audio task count"
|
||||
depends on BT_BLE_LOG_SPI_OUT_LE_AUDIO_ENABLED
|
||||
default 1
|
||||
help
|
||||
LE audio task count
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_MESH_ENABLED
|
||||
bool "Enable BLE mesh log output to SPI"
|
||||
default n
|
||||
help
|
||||
Enable BLE mesh log output to SPI
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_MESH_BUF_SIZE
|
||||
int "SPI transaction buffer size for BLE mesh logs"
|
||||
depends on BT_BLE_LOG_SPI_OUT_MESH_ENABLED
|
||||
default 1024
|
||||
help
|
||||
SPI transaction buffer size for BLE mesh logs.
|
||||
There will be 2 SPI DMA buffers with the same size.
|
||||
|
||||
config BT_BLE_LOG_SPI_OUT_MESH_TASK_CNT
|
||||
int "Mesh task count"
|
||||
depends on BT_BLE_LOG_SPI_OUT_MESH_ENABLED
|
||||
default 3
|
||||
help
|
||||
Mesh task count
|
||||
endif
|
||||
Reference in New Issue
Block a user