c3dhall3  2.0.0.0
Data Structures | Macros | Enumerations | Functions
log.h File Reference
#include "drv_uart.h"
#include <stdarg.h>

Go to the source code of this file.

Data Structures

struct  log_t
 LOG context structure. More...
 
struct  log_cfg_t
 LOG init configuration structure. More...
 

Macros

#define LOG_MAP_USB_UART(cfg)
 LOG MAP to the USB UART configuration. More...
 
#define LOG_MAP_MIKROBUS(cfg, mikrobus)
 LOG MAP to the MikroBUS configuration. More...
 

Enumerations

enum  log_level_t {
  LOG_LEVEL_DEBUG = 0x00, LOG_LEVEL_INFO = 0x01, LOG_LEVEL_WARNING = 0x02, LOG_LEVEL_ERROR = 0x03,
  LOG_LEVEL_FATAL = 0x04
}
 Log level values. More...
 

Functions

void log_init (log_t *log, log_cfg_t *cfg)
 Initializes LOG module. More...
 
void log_printf (log_t *log, const code char *f,...)
 Printf function. More...
 
void log_clear (log_t *log)
 Discards all characters from the output and input buffer. More...
 
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. More...
 
void log_info (log_t *log, const code char *f,...)
 INFO printf function. More...
 
void log_error (log_t *log, const code char *f,...)
 ERROR printf function. More...
 
void log_fatal (log_t *log, const code char *f,...)
 FATAL printf function. More...
 
void log_debug (log_t *log, const code char *f,...)
 DEBUG printf function. More...
 
void log_warning (log_t *log, const code char *f,...)
 WARNING printf function. More...
 
void log_log (log_t *log, char *prefix, const code char *f,...)
 Printf function with a variable prefix. More...