c3dhall3
2.0.0.0
|
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... | |
#define LOG_MAP_MIKROBUS | ( | cfg, | |
mikrobus | |||
) |
LOG MAP to the MikroBUS configuration.
#define LOG_MAP_USB_UART | ( | cfg | ) |
LOG MAP to the USB UART configuration.
enum log_level_t |
void log_clear | ( | log_t * | log | ) |
Discards all characters from the output and input buffer.
[in] | log | LOG context object. |
void log_debug | ( | log_t * | log, |
const code char * | f, | ||
... | |||
) |
DEBUG printf function.
This function uses to be a print message on the UART. This function uses the prefix [DEBUG] and check for log level
[in] | log | LOG context object. |
[in] | *f | pointer to the string |
[in] | ... | Other parameters |
void log_error | ( | log_t * | log, |
const code char * | f, | ||
... | |||
) |
ERROR printf function.
This function uses to be a print message on the UART. This function uses the prefix [ERROR] and check for log level
[in] | log | LOG context object. |
[in] | *f | pointer to the string |
[in] | ... | Other parameters |
void log_fatal | ( | log_t * | log, |
const code char * | f, | ||
... | |||
) |
FATAL printf function.
This function uses to be a print message on the UART. This function uses the prefix [FATAL] and check for log level
[in] | log | LOG context object. |
[in] | *f | pointer to the string |
[in] | ... | Other parameters |
void log_info | ( | log_t * | log, |
const code char * | f, | ||
... | |||
) |
INFO printf function.
This function uses to be a print message on the UART. This function uses the prefix [INFO] and check for log level
[in] | log | LOG context object. |
[in] | *f | pointer to the string |
[in] | ... | Other parameters |
Initializes LOG module.
Initializes LOG driver. This function needs to be called before other driver functions.
[in] | log | LOG context object. |
[in] | cfg | LOG configuration structure. |
void log_log | ( | log_t * | log, |
char * | prefix, | ||
const code char * | f, | ||
... | |||
) |
Printf function with a variable prefix.
This function uses to be a print message on the UART. This function uses a variable prefix.
[in] | log | LOG context object. |
[in] | prefix | Prefix. |
[in] | *f | pointer to the string |
[in] | ... | Other parameters |
void log_printf | ( | log_t * | log, |
const code char * | f, | ||
... | |||
) |
Printf function.
This function uses to be a print message on the UART.
[in] | log | LOG context object. |
[in] | *f | pointer to the string |
[in] | ... | Other parameters |
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
.
[in] | log | LOG context object. |
[out] | rx_data_buf | Array to place read data in. |
[in] | max_len | Maximal length |
void log_warning | ( | log_t * | log, |
const code char * | f, | ||
... | |||
) |
WARNING printf function.
This function uses to be a print message on the UART. This function uses the prefix [WARNING] and check for log level
[in] | log | LOG context object. |
[in] | *f | pointer to the string |
[in] | ... | Other parameters |