Răsfoiți Sursa

[TTY] fix posix_termios.h issue in serial.c

BernardXiong 4 ani în urmă
părinte
comite
924de6d1ea

+ 0 - 3
components/drivers/serial/serial.c

@@ -38,9 +38,6 @@
 #include <dfs_posix.h>
 #include <dfs_poll.h>
 
-#include <posix_termios.h>
-
-
 /* it's possible the 'getc/putc' is defined by stdio.h in gcc/newlib. */
 #ifdef getc
 #undef getc

+ 3 - 4
components/drivers/tty/SConscript

@@ -4,8 +4,7 @@ from building import *
 src = Glob('*.c')
 cwd = GetCurrentDir()
 CPPPATH = [cwd + "/include"]
-group = []
-if GetDepend('RT_USING_LWP'):
-    group = DefineGroup('tty', src, depend = ['RT_USING_TTY'], CPPPATH = CPPPATH)
-    
+
+group = DefineGroup('tty', src, depend = ['RT_USING_LWP', 'RT_USING_TTY'], CPPPATH = CPPPATH)
+
 Return('group')

+ 1 - 0
components/drivers/tty/tty.c

@@ -14,6 +14,7 @@
 #include <rtthread.h>
 #include <tty.h>
 #include <tty_ldisc.h>
+
 #if defined(RT_USING_POSIX)
 #include <posix_termios.h>
 #endif