没有合适的资源?快使用搜索试试~ 我知道了~
Serial Programming Guide for POSIX Operating Systems.pdf
5星 · 超过95%的资源 需积分: 10 85 下载量 60 浏览量
2008-07-03
11:22:11
上传
评论
收藏 87KB PDF 举报
温馨提示
试读
40页
Serial Programming Guide for POSIX Operating Systems<br>很经典的串口编程指南
资源推荐
资源详情
资源评论
Serial Programming Guide for POSIX Operating Systems
5th Edition, 2nd Revision
Michael R. Sweet
Copyright 1994−1999, All Rights Reserved.
Table of Contents
Introduction.........................................................................................................................................................1
Chapter 1, Basics of Serial Communications...................................................................................................3
What Are Serial Communications?.........................................................................................................3
What Is RS−232?.....................................................................................................................................4
Signal Definitions.......................................................................................................................4
Asynchronous Communications..............................................................................................................5
What Are Full Duplex and Half Duplex?...................................................................................6
Flow Control...............................................................................................................................6
What Is a Break?.........................................................................................................................7
Synchronous Communications................................................................................................................7
Accessing Serial Ports..............................................................................................................................7
Serial Port Files...........................................................................................................................7
Opening a Serial Port..................................................................................................................8
Writing Data to the Port..............................................................................................................9
Reading Data from the Port........................................................................................................9
Closing a Serial Port...................................................................................................................9
Chapter 2, Configuring the Serial Port...........................................................................................................11
The POSIX Terminal Interface..............................................................................................................11
Control Options.........................................................................................................................12
Local Options............................................................................................................................15
Input Options............................................................................................................................16
Output Options..........................................................................................................................17
Control Characters....................................................................................................................18
Chapter 3, MODEM Communications...........................................................................................................21
What Is a MODEM?..............................................................................................................................21
Communicating With a MODEM..........................................................................................................21
Standard MODEM Commands.................................................................................................22
Common MODEM Communication Problems........................................................................23
Chapter 4, Advanced Serial Programming....................................................................................................25
Serial Port IOCTLs................................................................................................................................25
Getting the Control Signals.......................................................................................................26
Setting the Control Signals.......................................................................................................27
Getting the Number of Bytes Available...................................................................................27
Selecting Input from a Serial Port..........................................................................................................27
The SELECT System Call........................................................................................................28
Using the SELECT System Call...............................................................................................28
Using SELECT with the X Intrinsics Library..........................................................................29
Appendix A, Pinouts.........................................................................................................................................31
RS−232 Pinouts.....................................................................................................................................31
RS−422 Pinouts.....................................................................................................................................32
RS−574 (IBM PC/AT) Pinouts..............................................................................................................32
SGI Pinouts............................................................................................................................................33
Serial Programming Guide for POSIX Operating Systems
Introduction i
Table of Contents
Appendix B, ASCII Control Codes.................................................................................................................35
Control Codes........................................................................................................................................35
Serial Programming Guide for POSIX Operating Systems
ii Appendix B, ASCII Control Codes
Introduction
The Serial Programming Guide for POSIX Operating Systems will teach you how to successfully, efficiently,
and portably program the serial ports on your UNIX® workstation or PC. Each chapter provides programming
examples that use the POSIX (Portable Standard for UNIX) terminal control functions and should work with
very few modifications under IRIX®, HP−UX, SunOS®, Solaris®, Digital UNIX®, Linux®, and most other
UNIX operating systems. The biggest difference between operating systems that you will find is the filenames
used for serial port device and lock files.
This guide is organized into the following chapters and appendices:
Chapter 1, Basics of Serial Programming•
Chapter 2, Configuring the Serial Port•
Chapter 3, Talking to MODEMs•
Chapter 4, Advanced Serial Programming•
Appendix A, RS−232 Pinouts•
Appendix B, ASCII Control Codes•
Introduction 1
剩余39页未读,继续阅读
资源评论
- wjs10332014-08-16串口编程方面的资料,谢谢分享
- partnermore2014-07-16串口编程方面的资料
- meihaifeng0072012-05-10没看清楚题目,是串口编程方面的资料,谢谢分享
- linux_1032013-11-07ISIG 当输入INTR、QUIT、SUSP或DSUSP时,产生相应的信号 ICANON 使用标准输入模式 XCASE 在ICANON和XCASE同时设置的情况下,终端只使用大写。 ECHO 显示输入字符 ECHOE 如果ICANON同时设置,ERASE将删除输入的字符 ECHOK 如果ICANON同时设置,KILL将删除当前行 ECHONL 如果ICANON同时设置,即使ECHO没有设置依然显示换行符 ECHOPRT 如果ECHO和ICANON同时设置,将删除打印出的字符(非POSIX) TOSTOP 向后台输出发送SIGTTOU信号
- lanejim2014-09-03不错的资源,可惜的是英文,对于英文不好的人来说有点困难
davisxie
- 粉丝: 2
- 资源: 21
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功