• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • /dev/ser1的波特率是負數?感到不可理解??!

    發表于:2007-05-25來源:作者:點擊數: 標簽:ser1波特率負數感到可理解
    #include termios.h #include fcntl.h #include unistd.h #include stdlib.h #include stdio.h int main( void ) { int fd; struct termios termios_p; speed_t speed; fd = open( /dev/ser1, O_RDWR ); tcgetattr( fd, termios_p); /* * Get input baud rat

    #include <termios.h>
    #include <fcntl.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <stdio.h>
    int main( void )
      {
        int fd;
        struct termios termios_p;
        speed_t speed;
        fd = open( "/dev/ser1", O_RDWR );
        tcgetattr( fd, &termios_p);
        /*
         *  Get input baud rate
         */
        speed = cfgetispeed( &termios_p);
        printf( "Input baud: %ld\n", speed );
        close( fd );
        return EXIT_SUCCESS;
      }

    # ./a.out
    Input baud: -1077937236

    為什么找不到/dev/ser1 ??用ls 看不到?
    # ls -a /dev|grep ser
    #
    不懂中。。。
    負數代表什么意思?

    發現并沒有/dev/ser1這個設備
    現在運行結果不同了??赡苁俏屹N錯程序了。SORRY?。。?!
    根據上面的程序。
    結果:
    Input baud: 4096

    暈了。。??

    原文轉自:http://www.kjueaiud.com

    評論列表(網友評論僅供網友表達個人看法,并不表明本站同意其觀點或證實其描述)
    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>