shuichan_old/V1.5/STM32F103_App1/HardWare/LOG/log.h

30 lines
649 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef LOG_H
#define LOG_H
#include <stdarg.h>
#include <stdio.h>
#include "main.h"
typedef enum {
LOG_TRACE,
LOG_DEBUG,
LOG_INFO,
LOG_WARN,
LOG_ERROR,
LOG_FATAL
}LogLevel;
void log_set_level(LogLevel level); /* 改等级并落 EEPROM */
void log_load_level(void);
LogLevel log_get_level(void); /* 开机读取保存的日志等级 */
void log_lock_init(void);
void log_mute(uint8_t on); /* AT 窗口静音BLE 设置期间暂停日志输出) */ /* 日志互斥锁初始化(调度器启动前调用一次) */
void log_debug(const char *fmt, ...);
void log_info(const char *fmt, ...);
void log_warn(const char *fmt, ...);
void log_error(const char *fmt, ...);
#endif