浏览代码

Implement the new log option into log.h and add compile option into platformio.ini

Per Mårtensson 1 月之前
父节点
当前提交
07d961c10a
共有 2 个文件被更改,包括 14 次插入0 次删除
  1. 13 0
      lib/SCSI2SD/src/firmware/log.h
  2. 1 0
      platformio.ini

+ 13 - 0
lib/SCSI2SD/src/firmware/log.h

@@ -37,6 +37,19 @@ extern void dbgmsg_f(const char *format, ...);
 #define LOGMSG_BUF(buf, size) logmsg_buf(buf, size)
 #define LOGMSG_F(format, ...) logmsg_f(format, __VA_ARGS__)
 
+#elseifdef EXTENDED_DEBUG_LOGGING
+extern bool g_log_debug;
+
+extern void logmsg_buf(const unsigned char *buf, unsigned long size);
+extern void logmsg_f(const char *format, ...);
+
+extern void dbgmsg_buf(const unsigned char *buf, unsigned long size);
+extern void dbgmsg_f(const char *format, ...);
+
+#define DBGMSG_BUF(buf, size) dbgmsg_buf(buf, size)
+#define DBGMSG_F(format, ...) dbgmsg_f(format, ##__VA_ARGS__)
+#define LOGMSG_BUF(buf, size) logmsg_buf(buf, size)
+#define LOGMSG_F(format, ...) logmsg_f(format, ##__VA_ARGS__)
 #else
 
 #define DBGMSG_BUF(buf, size) // Empty

+ 1 - 0
platformio.ini

@@ -136,6 +136,7 @@ build_flags =
     -DBLUESCSI_V2
     -DBLUESCSI_MCU_RP23XX
     -DROMDRIVE_OFFSET=${env:BlueSCSI_Pico_2.program_flash_allocation}
+    -DEXTENDED_DEBUG_LOGGING
 
 [env:BlueSCSI_Pico_2_DaynaPORT]
 extends = env:BlueSCSI_RP2MCU