串口相关定义在termios.h中: #include"termios.h" int Baudrate_Attr[]={B38400,B19200,B9600,B4800,B1200}; fcntl.h中定义O_RDWR #include <stdio.h> 定义 stderr