| New file |
| | |
| | | #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 |