|
|
@@ -19,64 +19,64 @@
|
|
|
|
|
|
/***** 宏定义 *****/
|
|
|
|
|
|
-#define DP_COLOR_NONE "\e[0m"
|
|
|
-#define DP_COLOR_RED "\e[31m"
|
|
|
-#define DP_COLOR_GREEN "\e[32m"
|
|
|
-#define DP_COLOR_YELLOW "\e[33m"
|
|
|
-#define DP_COLOR_BLUE "\e[34m"
|
|
|
-#define DP_COLOR_PURPLE "\e[35m" // 紫色
|
|
|
-#define DP_COLOR_WATHET "\e[36m" // 浅蓝
|
|
|
-#define DP_COLOR_WHITE "\e[37m"
|
|
|
+#define DP_COLOR_NONE "\033[0m"
|
|
|
+#define DP_COLOR_RED "\033[31m"
|
|
|
+#define DP_COLOR_GREEN "\033[32m"
|
|
|
+#define DP_COLOR_YELLOW "\033[33m"
|
|
|
+#define DP_COLOR_BLUE "\033[34m"
|
|
|
+#define DP_COLOR_PURPLE "\033[35m" // 紫色
|
|
|
+#define DP_COLOR_WATHET "\033[36m" // 浅蓝
|
|
|
+#define DP_COLOR_WHITE "\033[37m"
|
|
|
|
|
|
/* 信息提示 nt整行不带[tag] h只有[tag]显示浅蓝色 n[tag]显示为浅蓝色内容为蓝色 a[tag]整行为浅蓝色 */
|
|
|
#define dp_info_nt(fmt, args...) \
|
|
|
- printf(DP_COLOR_WATHET fmt DP_COLOR_NONE, ##args)
|
|
|
+ printf(DP_COLOR_WATHET fmt DP_COLOR_NONE "\r\n", ##args)
|
|
|
|
|
|
#define dp_info_h_s(fmt, args...) \
|
|
|
- printf(DP_COLOR_WATHET "[INFO] " DP_COLOR_NONE fmt, ##args)
|
|
|
+ printf(DP_COLOR_WATHET "[INFO] " DP_COLOR_NONE fmt "\r\n", ##args)
|
|
|
#define dp_info_h_c(fmt, args...) \
|
|
|
- printf(DP_COLOR_WATHET "[INFO][%s:%d] " DP_COLOR_NONE fmt, __func__, __LINE__, ##args)
|
|
|
+ printf(DP_COLOR_WATHET "[INFO][%s:%d] " DP_COLOR_NONE fmt "\r\n", __func__, __LINE__, ##args)
|
|
|
|
|
|
#define dp_info_n_s(fmt, args...) \
|
|
|
- printf(DP_COLOR_WATHET "[INFO] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, ##args)
|
|
|
+ printf(DP_COLOR_WATHET "[INFO] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", ##args)
|
|
|
#define dp_info_n_c(fmt, args...) \
|
|
|
- printf(DP_COLOR_WATHET "[INFO][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
|
|
|
+ printf(DP_COLOR_WATHET "[INFO][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
|
|
|
|
|
|
#define dp_info_a_s(fmt, args...) \
|
|
|
- printf(DP_COLOR_WATHET "[INFO] " fmt DP_COLOR_NONE, ##args)
|
|
|
+ printf(DP_COLOR_WATHET "[INFO] " fmt DP_COLOR_NONE "\r\n", ##args)
|
|
|
#define dp_info_a_c(fmt, args...) \
|
|
|
- printf(DP_COLOR_WATHET "[INFO][%s:%d] " fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
|
|
|
+ printf(DP_COLOR_WATHET "[INFO][%s:%d] " fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
|
|
|
|
|
|
/* 错误提示 nt整行不带[tag] h只有[tag]显示红色 n[tag]显示为红色内容为蓝色 a[tag]整行为红色 */
|
|
|
#define dp_err_nt(fmt, args...) \
|
|
|
- printf(DP_COLOR_RED fmt DP_COLOR_NONE, ##args)
|
|
|
+ printf(DP_COLOR_RED fmt DP_COLOR_NONE "\r\n", ##args)
|
|
|
|
|
|
#define dp_err_h_s(fmt, args...) \
|
|
|
- printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE fmt, ##args)
|
|
|
+ printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE fmt "\r\n", ##args)
|
|
|
#define dp_err_h_c(fmt, args...) \
|
|
|
- printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE fmt, __func__, __LINE__, ##args)
|
|
|
+ printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE fmt "\r\n", __func__, __LINE__, ##args)
|
|
|
|
|
|
#define dp_err_n_s(fmt, args...) \
|
|
|
- printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, ##args)
|
|
|
+ printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", ##args)
|
|
|
#define dp_err_n_c(fmt, args...) \
|
|
|
- printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
|
|
|
+ printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
|
|
|
|
|
|
#define dp_err_a_s(fmt, args...) \
|
|
|
- printf(DP_COLOR_RED "[ERR] " fmt DP_COLOR_NONE, ##args)
|
|
|
+ printf(DP_COLOR_RED "[ERR] " fmt DP_COLOR_NONE "\r\n", ##args)
|
|
|
#define dp_err_a_c(fmt, args...) \
|
|
|
- printf(DP_COLOR_RED "[ERR][%s:%d] " fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
|
|
|
+ printf(DP_COLOR_RED "[ERR][%s:%d] " fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
|
|
|
|
|
|
|
|
|
#define dp_err_n_s_rt(fmt, args...) \
|
|
|
- rt_printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, ##args)
|
|
|
+ rt_printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", ##args)
|
|
|
#define dp_err_n_c_rt(fmt, args...) \
|
|
|
- rt_printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
|
|
|
+ rt_printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
|
|
|
|
|
|
|
|
|
#define dp_err_n_s_pk(fmt, args...) \
|
|
|
- printk(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, ##args)
|
|
|
+ printk(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", ##args)
|
|
|
#define dp_err_n_c_pk(fmt, args...) \
|
|
|
- printk(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
|
|
|
+ printk(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
|
|
|
|
|
|
/***** 头文件 *****/
|
|
|
|