1 2 3 #pragma once 4 5 #include <cstdint> 6 7 #include "test/headless/log.h" 8 9 namespace bluetooth { 10 namespace test { 11 namespace headless { 12 13 template <typename T> 14 void dump(const T* data, std::string comment = std::string("dump")) { 15 const uint8_t* p = reinterpret_cast<const uint8_t*>(data); 16 for (size_t i = 0; i < sizeof(T); i++, p++) { 17 LOG_CONSOLE(" %s %p:0x%02x", comment.c_str(), p, *p); 18 } 19 } 20 21 } // namespace headless 22 } // namespace test 23 } // namespace bluetooth 24