(42)--6-4-2 嵌入式Linux下的串口应用程序开发.pptVIP

  • 1
  • 0
  • 约2.86千字
  • 约 12页
  • 2024-03-03 发布于陕西
  • 举报

(42)--6-4-2 嵌入式Linux下的串口应用程序开发.ppt

嵌入式Linux下应用程序开发DevelopmentofApplicationonEmbeddedLinux主要内容:6-4Linux下的接口操作Linux下的串口应用开发Linux下的网络通讯编程Linux多线程编程

Linux下的串口应用开发DevolpmentofSerialCommunicationApplicationunderLinux6-4-2 linux中的串口设备文件存放于/dev目录下,其中串口一,串口二对应设备名依次为“/dev/ttyS0”、“/dev/ttyS1”。在linux下操作串口与操作文件相同。1、串口概述

Linux下的串口应用开发DevolpmentofSerialCommunicationApplicationunderLinux6-4-2在使用串口之前必须设置相关配置,包括:波特率、数据位、校验位、停止位等。串口设置由下面结构体实现:2、串口设置

Linux下的串口应用开发DevolpmentofSerialCommunicationApplicationunderLinux6-4-2该结构中c_cflag最为重要,可设置波特率、数据位、校验位、停止位。在设置波特率时需在数字前加上‘B’,如B9600。B19200。使用其需通过“与”“或”操作方式。

Linux下的串口应用开发De

文档评论(0)

1亿VIP精品文档

相关文档