mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
fix(ble): added missed printf for ll log interface
This commit is contained in:
@ -119,6 +119,11 @@ struct ext_funcs_t {
|
|||||||
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
typedef void (*interface_func_t) (uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag);
|
typedef void (*interface_func_t) (uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
BLE_LOG_INTERFACE_FLAG_CONTINUE = 0,
|
||||||
|
BLE_LOG_INTERFACE_FLAG_END,
|
||||||
|
};
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
|
||||||
/* External functions or variables
|
/* External functions or variables
|
||||||
@ -411,20 +416,22 @@ void esp_bt_read_ctrl_log_from_flash(bool output)
|
|||||||
#if !CONFIG_BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
#if !CONFIG_BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
||||||
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag)
|
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag)
|
||||||
{
|
{
|
||||||
bool end = flag ? true : false;
|
bool end = (flag & BIT(BLE_LOG_INTERFACE_FLAG_END));
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#if CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
esp_bt_controller_log_storage(len, addr, end);
|
esp_bt_controller_log_storage(len, addr, end);
|
||||||
#else // !CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#else // !CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
||||||
portENTER_CRITICAL_SAFE(&spinlock);
|
portENTER_CRITICAL_SAFE(&spinlock);
|
||||||
esp_panic_handler_feed_wdts();
|
esp_panic_handler_feed_wdts();
|
||||||
for (int i = 0; i < len; i++) {
|
|
||||||
esp_rom_printf("%02x ", addr[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (end) {
|
if (len && addr) {
|
||||||
esp_rom_printf("\n");
|
for (int i = 0; i < len; i++) { esp_rom_printf("%02x ", addr[i]); }
|
||||||
}
|
}
|
||||||
|
if (len_append && addr_append) {
|
||||||
|
for (int i = 0; i < len_append; i++) { esp_rom_printf("%02x ", addr_append[i]); }
|
||||||
|
}
|
||||||
|
if (end) { esp_rom_printf("\n"); }
|
||||||
|
|
||||||
portEXIT_CRITICAL_SAFE(&spinlock);
|
portEXIT_CRITICAL_SAFE(&spinlock);
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,11 @@ struct ext_funcs_t {
|
|||||||
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
typedef void (*interface_func_t) (uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag);
|
typedef void (*interface_func_t) (uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
BLE_LOG_INTERFACE_FLAG_CONTINUE = 0,
|
||||||
|
BLE_LOG_INTERFACE_FLAG_END,
|
||||||
|
};
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
/* External functions or variables
|
/* External functions or variables
|
||||||
************************************************************************
|
************************************************************************
|
||||||
@ -1410,20 +1415,22 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
|
|||||||
#if !CONFIG_BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
#if !CONFIG_BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
||||||
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag)
|
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag)
|
||||||
{
|
{
|
||||||
bool end = flag ? true : false;
|
bool end = (flag & BIT(BLE_LOG_INTERFACE_FLAG_END));
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#if CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
esp_bt_controller_log_storage(len, addr, end);
|
esp_bt_controller_log_storage(len, addr, end);
|
||||||
#else // !CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#else // !CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
||||||
portENTER_CRITICAL_SAFE(&spinlock);
|
portENTER_CRITICAL_SAFE(&spinlock);
|
||||||
esp_panic_handler_feed_wdts();
|
esp_panic_handler_feed_wdts();
|
||||||
for (int i = 0; i < len; i++) {
|
|
||||||
esp_rom_printf("%02x ", addr[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (end) {
|
if (len && addr) {
|
||||||
esp_rom_printf("\n");
|
for (int i = 0; i < len; i++) { esp_rom_printf("%02x ", addr[i]); }
|
||||||
}
|
}
|
||||||
|
if (len_append && addr_append) {
|
||||||
|
for (int i = 0; i < len_append; i++) { esp_rom_printf("%02x ", addr_append[i]); }
|
||||||
|
}
|
||||||
|
if (end) { esp_rom_printf("\n"); }
|
||||||
|
|
||||||
portEXIT_CRITICAL_SAFE(&spinlock);
|
portEXIT_CRITICAL_SAFE(&spinlock);
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
}
|
}
|
||||||
|
@ -110,6 +110,11 @@ struct ext_funcs_t {
|
|||||||
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
typedef void (*interface_func_t) (uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag);
|
typedef void (*interface_func_t) (uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
BLE_LOG_INTERFACE_FLAG_CONTINUE = 0,
|
||||||
|
BLE_LOG_INTERFACE_FLAG_END,
|
||||||
|
};
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
|
||||||
/* External functions or variables
|
/* External functions or variables
|
||||||
@ -1481,20 +1486,22 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
|
|||||||
#if !CONFIG_BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
#if !CONFIG_BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
||||||
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag)
|
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag)
|
||||||
{
|
{
|
||||||
bool end = flag ? true : false;
|
bool end = (flag & BIT(BLE_LOG_INTERFACE_FLAG_END));
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#if CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
esp_bt_controller_log_storage(len, addr, end);
|
esp_bt_controller_log_storage(len, addr, end);
|
||||||
#else // !CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#else // !CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
||||||
portENTER_CRITICAL_SAFE(&spinlock);
|
portENTER_CRITICAL_SAFE(&spinlock);
|
||||||
esp_panic_handler_feed_wdts();
|
esp_panic_handler_feed_wdts();
|
||||||
for (int i = 0; i < len; i++) {
|
|
||||||
esp_rom_printf("%02x ", addr[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (end) {
|
if (len && addr) {
|
||||||
esp_rom_printf("\n");
|
for (int i = 0; i < len; i++) { esp_rom_printf("%02x ", addr[i]); }
|
||||||
}
|
}
|
||||||
|
if (len_append && addr_append) {
|
||||||
|
for (int i = 0; i < len_append; i++) { esp_rom_printf("%02x ", addr_append[i]); }
|
||||||
|
}
|
||||||
|
if (end) { esp_rom_printf("\n"); }
|
||||||
|
|
||||||
portEXIT_CRITICAL_SAFE(&spinlock);
|
portEXIT_CRITICAL_SAFE(&spinlock);
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
}
|
}
|
||||||
|
@ -102,6 +102,11 @@ struct ext_funcs_t {
|
|||||||
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
typedef void (*interface_func_t) (uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag);
|
typedef void (*interface_func_t) (uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
BLE_LOG_INTERFACE_FLAG_CONTINUE = 0,
|
||||||
|
BLE_LOG_INTERFACE_FLAG_END,
|
||||||
|
};
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
/* External functions or variables
|
/* External functions or variables
|
||||||
************************************************************************
|
************************************************************************
|
||||||
@ -1404,20 +1409,22 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
|
|||||||
#if !CONFIG_BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
#if !CONFIG_BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED
|
||||||
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag)
|
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, uint32_t len_append, const uint8_t *addr_append, uint32_t flag)
|
||||||
{
|
{
|
||||||
bool end = flag ? true : false;
|
bool end = (flag & BIT(BLE_LOG_INTERFACE_FLAG_END));
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#if CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
esp_bt_controller_log_storage(len, addr, end);
|
esp_bt_controller_log_storage(len, addr, end);
|
||||||
#else // !CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#else // !CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
||||||
portENTER_CRITICAL_SAFE(&spinlock);
|
portENTER_CRITICAL_SAFE(&spinlock);
|
||||||
esp_panic_handler_feed_wdts();
|
esp_panic_handler_feed_wdts();
|
||||||
for (int i = 0; i < len; i++) {
|
|
||||||
esp_rom_printf("%02x ", addr[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (end) {
|
if (len && addr) {
|
||||||
esp_rom_printf("\n");
|
for (int i = 0; i < len; i++) { esp_rom_printf("%02x ", addr[i]); }
|
||||||
}
|
}
|
||||||
|
if (len_append && addr_append) {
|
||||||
|
for (int i = 0; i < len_append; i++) { esp_rom_printf("%02x ", addr_append[i]); }
|
||||||
|
}
|
||||||
|
if (end) { esp_rom_printf("\n"); }
|
||||||
|
|
||||||
portEXIT_CRITICAL_SAFE(&spinlock);
|
portEXIT_CRITICAL_SAFE(&spinlock);
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user