微处理器系统结构与嵌入式系统-第十一章_基于ARM微处理器的软件件系统设计解读.pptVIP

  • 3
  • 0
  • 约9.43千字
  • 约 36页
  • 2016-11-02 发布于湖北
  • 举报

微处理器系统结构与嵌入式系统-第十一章_基于ARM微处理器的软件件系统设计解读.ppt

微处理器系统结构与嵌入式系统-第十一章_基于ARM微处理器的软件件系统设计解读.ppt

数据格式设置函数 int set_Parity(int fd,int databits,int stopbits,int parity) { struct termios options; if ( tcgetattr( fd,options) != 0) { perror(SetupSerial 1); return(FALSE); } options.c_cflag = ~CSIZE; switch (databits) //设置数据位个数 { case 7: options.c_cflag |= CS7; //设置数据位为7位 break; case 8: options.c_cflag |= CS8; //设置数据位为8位 break; default: fprintf(stderr,Unsupported data sizen); return (FALSE); } 数据格式设置函数 switch (stopbits) //设置停止位个数 { case 1:

文档评论(0)

1亿VIP精品文档

相关文档