forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

wujiazhi
2024-06-13 72def895431ad7a08e635b11f3da738e2b2c4618
Soft/test_log.h
New file
@@ -0,0 +1,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