#ifndef TRACE_H
#define TRACE_H

#define STR(a) #a

#ifdef TEST
#include "stdio.h"
#include <stddef.h>
#include <stdint.h>

#define TRACE(...) fprintf(stderr, __VA_ARGS__);
#define TRACELN(MSG) TRACE(MSG "\n")

extern void dump_data(const uint8_t *data, size_t len);

#endif // TEST

// just do nothing if TEST is not defined
#ifndef TEST

#define TRACE(...)
#define TRACELN(MSG)
#define dump_data(DATA_PTR, LEN)

#endif // !TEST
//
#endif // !TRACE_H
