refactor: sync from template - ENABLE/DISABLE macro pattern

- board_config.h: replace #define/#undef with ENABLE/DISABLE constants
- All debug switches use ENABLE/DISABLE instead of define/undef
- Replace #ifdef with #if MACRO == ENABLE across all sources
- Sync updated README documentation
This commit is contained in:
Nova
2026-07-28 00:45:49 +08:00
parent 0cf931c0e9
commit 69352e92cf
7 changed files with 171 additions and 55 deletions
+2 -2
View File
@@ -101,7 +101,7 @@ void system_software_reset(void)
}
/* Debug output control */
#ifdef COM_DEBUG
#if COM_DEBUG == ENABLE
#include <stdio.h>
#define COMMAND_DEBUG(fmt, ...) printf("[COMMAND] " fmt "\n", ##__VA_ARGS__)
#else
@@ -565,7 +565,7 @@ void command_process(void) {
// 到帧尾,进行各项校验
bool verification_status = true;
#ifdef DEBUG_VERBOSE
#if DEBUG_VERBOSE == ENABLE
if (cmd_buf[0] != PROTOCOL_PACKAGE_HEADER) {
send_response(RESP_TYPE_HEADER_ERR, s_report_status_err, sizeof(s_report_status_err));
verification_status = false;