From d80aa4da391829c0b3a0625d780245ab38d7bc89 Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Fri, 22 Jan 2021 12:48:06 +0100 Subject: [PATCH] Debug HCI frames only with PRINT_HCI_INFO defined This avoids dumping HCI packets on the console as soon as the serial link is enabled. In some situations, when the serial trace is on all the HCI traces are not useful. Signed-off-by: Francois Ramu --- src/utility/HCI.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utility/HCI.cpp b/src/utility/HCI.cpp index f1bc1552..b8168f68 100644 --- a/src/utility/HCI.cpp +++ b/src/utility/HCI.cpp @@ -649,6 +649,7 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[]) void HCIClass::dumpPkt(const char* prefix, uint8_t plen, uint8_t pdata[]) { +#if defined(PRINT_HCI_INFO) if (_debug) { _debug->print(prefix); @@ -665,6 +666,7 @@ void HCIClass::dumpPkt(const char* prefix, uint8_t plen, uint8_t pdata[]) _debug->println(); _debug->flush(); } +#endif /*(PRINT_HCI_INFO)*/ } void HCIClass::setTransport(HCITransportInterface *HCITransport)