<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > ARM串口設(shè)置參數(shù)解釋

          ARM串口設(shè)置參數(shù)解釋

          作者: 時(shí)間:2016-11-11 來(lái)源:網(wǎng)絡(luò) 收藏
          termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow, cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed - 獲取和設(shè)置終端屬性,行控制,獲取和設(shè)置波特率

          SYNOPSIS 總覽
          #include
          #include
          int tcgetattr(int

          本文引用地址:http://www.ex-cimer.com/article/201611/316883.htm

          int tcsetattr(int fd, int optional_actions, struct termios *termios_p);

          int tcsendbreak(int fd, int duration);

          int tcdrain(int fd);

          int tcflush(int fd, int queue_selector);

          int tcflow(int fd, int action);

          int cfmakeraw(struct termios *termios_p);

          speed_t cfgetispeed(struct termios *termios_p);

          speed_t cfgetospeed(struct termios *termios_p);

          int cfsetispeed(struct termios *termios_p, speed_t speed);

          int cfsetospeed(struct termios *termios_p, speed_t speed);

          DESCRIPTION 描述
          termios 函數(shù)族提供了一個(gè)常規(guī)的終端接口,用于控制非同步通信端口。
          這里描述的大部分屬性有一個(gè) termios_p 類型的參數(shù),它是指向一個(gè) termios 結(jié)構(gòu)的指針。這個(gè)結(jié)構(gòu)包含了至少下列成員:

          tcflag_t c_iflag; /* 輸入模式 */
          tcflag_t c_oflag; /* 輸出模式 */
          tcflag_t c_cflag; /* 控制模式 */
          tcflag_t c_lflag; /* 本地模式 */
          cc_t c_cc[NCCS]; /* 控制字符 */
          c_iflag 標(biāo)志常量:

          IGNBRK
          忽略輸入中的 BREAK 狀態(tài)。
          BRKINT
          如果設(shè)置了 IGNBRK,將忽略 BREAK。如果沒(méi)有設(shè)置,但是設(shè)置了 BRKINT,那么 BREAK 將使得輸入和輸出隊(duì)列被刷新,如果終端是一個(gè)前臺(tái)進(jìn)程組的控制終端,這個(gè)進(jìn)程組中所有進(jìn)程將收到 SIGINT 信號(hào)。如果既未設(shè)置 IGNBRK 也未設(shè)置 BRKINT,BREAK 將視為與 NUL 字符同義,除非設(shè)置了 PARMRK,這種情況下它被視為序列 377 看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();