天嵌 ARM开发社区

 找回密码
 注册
查看: 1375|回复: 0

串口0RTS引脚拉高

[复制链接]
手指恋上烟 发表于 2012-9-18 20:38:44 | 显示全部楼层 |阅读模式
unsigned int controll;
unsigned int RTS;
RTS = TIOCM_RTS;
unsigned int CTS;
CTS = TIOCM_CTS;
while(1){
     if(ioctl(fd,TIOCMBIS,&RTS) > 0 )//结果为负数
  {
   printf("RTS set success!\n");
  }
  if(ioctl(fd,TIOCMBIS,&CTS))//结果为负数
  {
   printf("CTS set success!\n");
  }
  ioctl(fd,TIOCMGET,&controll);
  printf("%x\n",controll);
}
return 0;
为什么设置RTS和CTS引脚都不能成功打印信息,只打印controll的值
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-6-12 06:05 , Processed in 1.046875 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表