MCU-Common
Modules useful for embedded (MCU) programming
logger Struct Reference

Logger instance. More...

#include <logger.h>

Collaboration diagram for logger:

Data Fields

void(* write_cb )(const char *str, size_t length)
 Pointer to write callback implemented by driver. More...
 
struct fifofifo
 Pointer to fifo instance for storing logger_entry entries. More...
 
char * str
 Pointer to a buffer used to store string composed by sprintf. More...
 
size_t str_size
 Size of the string buffer. More...
 
bool initialized
 Logger initialized flag (handled internally) More...
 

Detailed Description

Logger instance.

Field Documentation

◆ write_cb

void(* write_cb) (const char *str, size_t length)

Pointer to write callback implemented by driver.

The callback is called from logger_process() during deferred processing. The callback provides the driver with a string which is supposed to be written to the output interface (e.g. serial port).

Parameters
[in]strPointer to the string to be written (formatted by sprintf), not null-terminated
lengthCount of characters to be written

◆ fifo

struct fifo* fifo

Pointer to fifo instance for storing logger_entry entries.

◆ str

char* str

Pointer to a buffer used to store string composed by sprintf.

◆ str_size

size_t str_size

Size of the string buffer.

◆ initialized

bool initialized

Logger initialized flag (handled internally)


The documentation for this struct was generated from the following file: