#ifndef DEBUGREP_H_INCLUDED
#define DEBUGREP_H_INCLUDED

#define DEBUG_PREFIX "USBJoystick: "

#include <stdint.h>

// Each line carries the uptime in seconds.centiseconds.
int32_t debug_printf(char *cntrl_string, ...);

// Uptime in centiseconds (OS_ReadMonotonicTime).
uint32_t debug_now_cs(void);

// Logs the real-time clock beside the uptime, so lines can be matched to
// Reporter's own wall-clock stamps.
void debug_anchor(const char *why);

#define DEBUG_HEX_PER_LINE 16

// Logs a byte buffer as a heading line then rows of hex, each with its
// offset, so a pasted log can be turned back into the bytes.
void debug_hexdump(const char *what, const uint8_t *data, uint32_t len);

#endif
