Ver código fonte

Add serial logging over USB

Eric Helgeson 2 anos atrás
pai
commit
8b5dccf516
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      lib/BlueSCSI_platform_RP2040/BlueSCSI_platform.cpp

+ 4 - 0
lib/BlueSCSI_platform_RP2040/BlueSCSI_platform.cpp

@@ -319,10 +319,14 @@ void mbed_error_hook(const mbed_error_ctx * error_context)
 // This function is called for every log message.
 void platform_log(const char *s)
 {
+    #ifdef IS_STANDALONE_2040
     if (g_uart_initialized)
     {
         uart_puts(uart0, s);
     }
+    #else
+    Serial.print(s);
+    #endif
 }
 
 static int g_watchdog_timeout;