Go to the documentation of this file.
74 #define LOG_MAP_USB_UART(cfg) \
75 cfg.rx_pin = USB_UART_RX; \
76 cfg.tx_pin = USB_UART_TX; \
78 cfg.level = LOG_LEVEL_DEBUG;
82 #define LOG_MAP_MIKROBUS(cfg, mikrobus) \
83 cfg.rx_pin = MIKROBUS(mikrobus, MIKROBUS_RX); \
84 cfg.tx_pin = MIKROBUS(mikrobus, MIKROBUS_TX); \
86 cfg.level = LOG_LEVEL_DEBUG;
123 int8_t
log_read (
log_t *log, uint8_t *rx_data_buf, uint8_t max_len );
190 void log_log (
log_t *log,
char * prefix,
const code
char * f, ... );
uart_t uart
Definition: log.h:57
void log_init(log_t *log, log_cfg_t *cfg)
Initializes LOG module.
void log_info(log_t *log, const code char *f,...)
INFO printf function.
hal_pin_name_t rx_pin
Definition: log.h:65
log_level_t log_level
Definition: log.h:58
void log_warning(log_t *log, const code char *f,...)
WARNING printf function.
void log_log(log_t *log, char *prefix, const code char *f,...)
Printf function with a variable prefix.
void log_clear(log_t *log)
Discards all characters from the output and input buffer.
LOG context structure.
Definition: log.h:55
void log_printf(log_t *log, const code char *f,...)
Printf function.
int8_t log_read(log_t *log, uint8_t *rx_data_buf, uint8_t max_len)
Reads at most size bytes of data from the device into buffer.
LOG init configuration structure.
Definition: log.h:63
void log_error(log_t *log, const code char *f,...)
ERROR printf function.
log_level_t level
Definition: log.h:68
log_level_t
Log level values.
Definition: log.h:44
hal_pin_name_t tx_pin
Definition: log.h:66
void log_debug(log_t *log, const code char *f,...)
DEBUG printf function.
void log_fatal(log_t *log, const code char *f,...)
FATAL printf function.
uint32_t baud
Definition: log.h:67