Bläddra i källkod

update port.c

Signed-off-by: yangfasheng <yangfasheng@rt-thread.com>
yangfasheng 7 år sedan
förälder
incheckning
5424d0e3dc
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      rtthread-port/port.c

+ 2 - 2
rtthread-port/port.c

@@ -99,11 +99,11 @@ void jerry_port_log (jerry_log_level_t level, const char *format, ...)
      * large excluding the terminating null byte. If the output string
      * large excluding the terminating null byte. If the output string
      * would be larger than the rt_log_buf, we have to adjust the output
      * would be larger than the rt_log_buf, we have to adjust the output
      * length. */
      * length. */
-    length = vsnprintf(rt_log_buf, sizeof(rt_log_buf) - 1, format, args);
+    length = rt_vsnprintf(rt_log_buf, sizeof(rt_log_buf) - 1, format, args);
     if (length > RT_JS_CONSOLEBUF_SIZE - 1)
     if (length > RT_JS_CONSOLEBUF_SIZE - 1)
         length = RT_JS_CONSOLEBUF_SIZE - 1;
         length = RT_JS_CONSOLEBUF_SIZE - 1;
 #ifdef RT_USING_DEVICE
 #ifdef RT_USING_DEVICE
-    printf("%s", rt_log_buf);
+    rt_kprintf("%s", rt_log_buf);
 #else
 #else
     rt_hw_console_output(rt_log_buf);
     rt_hw_console_output(rt_log_buf);
 #endif
 #endif