摘要: 一 问题 读取驱动设置并显示回显位的状态。二 分析 标准输入的文件描述符为0 使用tcgetattr()函数和termios结构体可以读取到设备的属性 回显位状态放置在termios.c_lflag中三 实现#include <stdio.h>#include <termios.h>#include <stdlib.h>main(){ struct termios info; int rv; /*读取终端设置*/ rv = tcgetattr(0,&info); if(rv == -1) { ... 阅读全文
posted @ 2013-03-05 15:31 布兰姥爷 阅读(402) 评论(0) 推荐(0) 编辑