第一次提交
This commit is contained in:
20
app_cail/mx_log/logRTT/log_rtt.h
Normal file
20
app_cail/mx_log/logRTT/log_rtt.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
typedef enum {
|
||||
LOG_LVL_ERROR = 0,
|
||||
LOG_LVL_WARN = 1,
|
||||
LOG_LVL_INFO = 2,
|
||||
LOG_LVL_DEBUG = 3,
|
||||
} log_level_t;
|
||||
|
||||
void log_rtt_set_level(log_level_t lvl);
|
||||
void log_rtt_printf(log_level_t lvl, const char* tag, const char* fmt, ...);
|
||||
void log_rtt_init(void);
|
||||
void log_hex_frame(const char * tag , const uint8_t* data, uint16_t len);
|
||||
|
||||
#define LOGE(tag, fmt, ...) log_rtt_printf(LOG_LVL_ERROR, tag, fmt, ##__VA_ARGS__)
|
||||
#define LOGW(tag, fmt, ...) log_rtt_printf(LOG_LVL_WARN, tag, fmt, ##__VA_ARGS__)
|
||||
#define LOGI(tag, fmt, ...) log_rtt_printf(LOG_LVL_INFO, tag, fmt, ##__VA_ARGS__)
|
||||
#define LOGD(tag, fmt, ...) log_rtt_printf(LOG_LVL_DEBUG, tag, fmt, ##__VA_ARGS__)
|
||||
|
||||
Reference in New Issue
Block a user