Interface for simple USB logging. More...
Interface for simple USB logging.
Simple Example:
#include <logger.h>
Public Member Functions | |
Logger () | |
Static Public Member Functions | |
static void | Print (const char *format,...) |
static void | PrintLine (const char *format,...) |
static void | StartLog (bool wait_for_pc=false) |
static void | PrintV (const char *format, va_list va) |
static void | PrintLineV (const char *format, va_list va) |
Protected Types | |
enum | LoggerConsts { LOGGER_SYNC_OUT = 0 , LOGGER_SYNC_IN = 2 } |
Static Protected Member Functions | |
static void | TransmitSync (const void *buffer, size_t bytes) |
static void | TransmitBuf () |
static void | AppendNewLine () |
static constexpr size_t | NewLineSeqLength () |
Static Protected Attributes | |
static char | tx_buff_ [128] |
static size_t | tx_ptr_ = 0 |
static size_t | pc_sync_ = LOGGER_SYNC_OUT |
static LoggerImpl< dest > | impl_ |
|
protected |
|
inline |
Object constructor
|
staticprotected |
Trim control characters and append clean newline sequence, if there's room in the buffer
|
inlinestaticconstexprprotected |
Constexpr function equivalent of strlen(LOGGER_NEWLINE)
< custom newline character sequence
|
static |
Print formatted string
|
static |
Print formatted string appending line termination sequence
|
static |
Variadic argument variant of PrintLine()
|
static |
Variadic argument variant of Print()
|
static |
Start the logging session.
wait_for_pc | block until remote terminal is ready |
|
staticprotected |
Transfer accumulated data
|
inlinestaticprotected |
Blocking wrapper for Transmit()