From 017c2996ac90e47dcc79147aa4883ee09cb3810b Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 10 Mar 2021 14:29:48 +0100 Subject: [PATCH] hci_dump: arduino port --- port/arduino/BTstack.cpp | 4 +++- port/arduino/Makefile | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/port/arduino/BTstack.cpp b/port/arduino/BTstack.cpp index f4cb7f4c9..cddae2757 100644 --- a/port/arduino/BTstack.cpp +++ b/port/arduino/BTstack.cpp @@ -30,6 +30,7 @@ #include "gap.h" #include "hci.h" #include "hci_dump.h" +#include "hci_dump_embedded_stdout.h" #include "l2cap.h" #include "ble/att_db.h" #include "ble/att_server.h" @@ -801,8 +802,9 @@ void BTstackManager::setup(void){ } void BTstackManager::enablePacketLogger(void){ - hci_dump_open(NULL, HCI_DUMP_STDOUT); + hci_dump_init(hci_dump_embedded_stdout_get_instance()); } + void BTstackManager::enableDebugLogger(){ // enable LOG_INFO messages hci_dump_enable_log_level(LOG_LEVEL_INFO, 1); diff --git a/port/arduino/Makefile b/port/arduino/Makefile index ef964fb5d..198a06a4a 100644 --- a/port/arduino/Makefile +++ b/port/arduino/Makefile @@ -15,7 +15,7 @@ BLE_FILES = att_db.c att_server.c att_dispatch.c att_db_util.c le_device_db_mem BLE_FILES += sm.c BEL_GATT_FILES = ancs_client.c PORT_FILES = btstack_config.h bsp_arduino_em9301.cpp BTstack.cpp BTstack.h -EMBEDDED_FILES = btstack_run_loop_embedded.c btstack_uart_block_embedded.c +EMBEDDED_FILES = btstack_run_loop_embedded.c btstack_uart_block_embedded.c hci_dump_embedded_stdout.c PATHS = $(addprefix ${BTSTACK_ROOT}/src/, ${SRC_FILES}) PATHS += $(filter-out ${BTSTACK_ROOT}/src/btstack.h, $(wildcard ${BTSTACK_ROOT}/src/*.h))