forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

wujiazhi
2024-06-11 65062d0d5b21f838aa0043a15ce54cfab8d72c43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef LOG_H
#define LOG_H
 
#include "define_all.h"  
 
#ifdef __cplusplus
extern "C" {
#endif
 
#define LOG_PRINT_OPEN 1
 
#define LOG_BUF_SIZE 512
 
typedef long long (*get_sys_time_ms_def)(void);
 
enum log_debug_type
{
    DEBUG_NORMAL  = 0U,
    DEBUG_WARNING,
    DEBUG_ERROR
};
 
void log_print(enum log_debug_type color, const char *file, int line, const char *func, const char* fmt, ...);
void log_time_register(get_sys_time_ms_def p_get_sys_time_ms);
 
#define LOG_D(...) log_print(DEBUG_NORMAL, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
 
#ifdef __cplusplus
}
#endif
 
#endif