mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 13:44:32 +02:00
change(ble): update controller log print interface
This commit is contained in:
@@ -386,23 +386,6 @@ static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
|
||||||
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end)
|
|
||||||
{
|
|
||||||
if (!end) {
|
|
||||||
for (int i = 0; i < len; i++) {
|
|
||||||
esp_rom_printf("%02x,", addr[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
for (int i = 0; i < len; i++) {
|
|
||||||
esp_rom_printf("%02x,", addr[i]);
|
|
||||||
}
|
|
||||||
esp_rom_printf("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
|
||||||
|
|
||||||
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
|
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
|
||||||
static void hci_uart_start_tx_wrapper(int uart_no)
|
static void hci_uart_start_tx_wrapper(int uart_no)
|
||||||
{
|
{
|
||||||
@@ -1008,11 +991,25 @@ uint8_t esp_ble_get_chip_rev_version(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < len; i++) {
|
||||||
|
esp_rom_printf("%02x,", addr[i]);
|
||||||
|
}
|
||||||
|
if (end) {
|
||||||
|
esp_rom_printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void esp_ble_controller_log_dump_all(bool output)
|
void esp_ble_controller_log_dump_all(bool output)
|
||||||
{
|
{
|
||||||
|
portMUX_TYPE spinlock;
|
||||||
|
|
||||||
|
portENTER_CRITICAL_SAFE(&spinlock);
|
||||||
BT_ASSERT_PRINT("\r\n[DUMP_START:");
|
BT_ASSERT_PRINT("\r\n[DUMP_START:");
|
||||||
ble_log_async_output_dump_all(output);
|
ble_log_async_output_dump_all(output);
|
||||||
BT_ASSERT_PRINT("]\r\n");
|
BT_ASSERT_PRINT("]\r\n");
|
||||||
|
portEXIT_CRITICAL_SAFE(&spinlock);
|
||||||
}
|
}
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user