Skip to content
Snippets Groups Projects
Commit 1143d964 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Merge "headless: Add dump.h template" am: 88759898 am: bfb9bdc8

parents d6c90cc6 bfb9bdc8
No related branches found
No related tags found
No related merge requests found
#pragma once
#include <cstdint>
#include "test/headless/log.h"
namespace bluetooth {
namespace test {
namespace headless {
template <typename T>
void dump(const T* data, std::string comment = std::string("dump")) {
const uint8_t* p = reinterpret_cast<const uint8_t*>(data);
for (size_t i = 0; i < sizeof(T); i++, p++) {
LOG_CONSOLE(" %s %p:0x%02x", comment.c_str(), p, *p);
}
}
} // namespace headless
} // namespace test
} // namespace bluetooth
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment