feat: 增加CRC-16校验(顺便添加了缺少的厂家设备驱动)
feat: 增加第三方模块 lwrb feat: 增加麦轮逆解部分 feat: 增加LOG输出格式
This commit is contained in:
@@ -6,6 +6,25 @@
|
||||
|
||||
#define BY_DEBUG_USART_INDEX (USART1)
|
||||
|
||||
#define BY_DEBUG_LOG_MODE (2) // 0-not log, 1-no debug log, 2-all
|
||||
|
||||
#if (BY_DEBUG_LOG_MODE == 2)
|
||||
#define LOGI(format, ...) lwprintf("[INFO] " format "\r\n", ##__VA_ARGS__)
|
||||
#define LOGW(format, ...) lwprintf("[WARN] " format "\r\n", ##__VA_ARGS__)
|
||||
#define LOGE(format, ...) lwprintf("[ERR] " format "\r\n", ##__VA_ARGS__)
|
||||
#define LOGD(format, ...) lwprintf("[DEBUG] " format "\r\n", ##__VA_ARGS__)
|
||||
#elif (BY_DEBUG_LOG_MODE == 1)
|
||||
#define LOGI(format, ...) lwprintf("[INFO] " format "\r\n", ##__VA_ARGS__)
|
||||
#define LOGW(format, ...) lwprintf("[WARN] " format "\r\n", ##__VA_ARGS__)
|
||||
#define LOGE(format, ...) lwprintf("[ERR] " format "\r\n", ##__VA_ARGS__)
|
||||
#define LOGD(format, ...)
|
||||
#elif (BY_DEBUG_LOG_MODE == 0)
|
||||
#define LOGI(format, ...)
|
||||
#define LOGW(format, ...)
|
||||
#define LOGE(format, ...)
|
||||
#define LOGD(format, ...)
|
||||
#endif
|
||||
|
||||
void by_debug_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user