亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? serdpcpl.c

?? 一個C語言寫的讀入位置跟蹤器數據的源程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
                if ((outputmode != STREAM) || (rxchar == RXTIMEOUT))
                {
                    clear_rx();
                    return(RXERRORS);
                }

                /*
                   If an Error occured and we are in STREAM mode, resynch
                */
                if (outputmode == STREAM)
                {
                    /*
                       Resynch
                       ...and keep track of the phase error
                    */
                    phaseerror_count++;
                    resynch = TRUE;
                    continue;
                }
            }

            /*
                Check to make sure the the phase bit is a '1'
                If not, then if STREAM mode, resynch
                else, return with error
            */
            if (!(rxchar & 0x80))
            {
                if (outputmode == STREAM)
                {
                    /*
                       Resynch
                       ...and keep track of the phase error
                    */
                    phaseerror_count++;
                    resynch = TRUE;
                    continue;
                }
                else
                {
                     clear_rx();
                     return(RXPHASEERROR);
                }
            }
        }
        else    /* rxcount > 0 */
        {
            /*
                Get remainder of Block of data from the serial port, recsize characters
                and store them in rxbuf
            */
            if ((rxchar = waitforchar()) >= 0)  /* no errors */
            {
                /*
                   Check Phase bit
                */
                if (rxchar & 0x80)              /* check to see that phase bit = '0' */
                {
                    if (outputmode == STREAM)
                    {
                        phaseerror_count++;     /* keep track of phase errors */
                        resynch = TRUE;         /* loop again flag */
                        continue;
                    }
                    else
                    {
                        clear_rx();
                        return(RXPHASEERROR);       /* return phase error */
                    }
                }
            }
            else
            {
                if (outputmode == STREAM)
                {
                    phaseerror_count++;     /* keep track of phase errors */
                    resynch = TRUE;         /* loop again flag */
                    continue;
                }
                else
                {              
                    clear_rx();
                    return(RXERRORS);
                }
            }
        }
        /*
           Store the received character
        */
        *rxbufptr++ = rxchar;   /* store and adjust pointer */
        rxcount++;              /* increment */
    }
    while ((resynch) || (rxcount < recsize));

    /*
        Return the number of characters received
    */
    return(rxcount);
}

/*
    send_serial_cmd     -    Send Serial Command to the Bird port

    Prototype in:       serial.h

    Parameters Passed:  cmd         -   string to send to the serial point
                        cmdsize     -   size of the cmd string (cmd is NOT
                                        NULL terminated, since the data can
                                        be NULL)
    Return Value:       number of characters transmitted

    Remarks:            Routine will send a string of characters to the serial
                        port.  The string is pointed to by cmd and all
                        characters will be sent upto but NOT including
                        the NULL
*/
int send_serial_cmd(cmd,cmdsize)
unsigned char * cmd;
short cmdsize;
{
	short txcount = 0;
    unsigned char rs232tofbbcmd;

    /*
        Send the RS232 to FBB Prefice Character if non-zero
    */
    if (rs232tofbbaddr > 0)
    {
        if (rs232tofbbaddr <= 15)
            /* pass through command 0-15 */
            rs232tofbbcmd = (unsigned char)(0xF0 | rs232tofbbaddr);
        else
            /* pass through command 16-31 */
            rs232tofbbcmd = (unsigned char)(0xE0 | rs232tofbbaddr-16);

        while (send_serial_char(rs232tofbbcmd) == TXNOTEMPTY);
    }

    while (txcount < cmdsize)
    {
        /*
            Wait until the character goes out OK
        */
        while ((send_serial_char(*cmd)) == TXNOTEMPTY);

        /*
            point to the next character
        */
        cmd++;
        txcount++;
    }
    return(txcount++);
}

/*
    get_serial_char -   Get 1 Character from the serial port if one is available

    Prototype in:       serial.h

    Parameters Passed:  void

    Return Value:       returns the

    Remarks:            returns the receive character if successful,
                        RXERRORS if recieve errors
                        NODATAAVAIL if no characer available
*/
int get_serial_char()
{
	short linestatus;

    /*
        Get line status and check if character is available
            else return
    */
    if ((linestatus = INPORTB(com_base + LINESTATUS)) & DATARDY)
    {
        /*
            check for errors and return
        */
        if ((rxerrors = (linestatus & RXERRORMSK)) != 0)
            return(RXERRORS);

        /*
            Send back the RX data
        */
        return(INPORTB(com_base + RXBUF));
    }
    else
    {
        /*
            check for errors and return
        */
        if ((rxerrors = (linestatus & RXERRORMSK)) != 0)
            return(RXERRORS);

        return(NODATAAVAIL);
    }
}
/*
    send_serial_char    -   Send one serial char to the serial port

    Prototype in:       serial.h

    Parameters Passed:  chr     -   character to send to the serial port

    Return Value:       returns TRUE if successful, or TXNOTEMPTY if
                        cannot send because the holding register is not
                        empty

    Remarks:
*/
int send_serial_char(chr)
unsigned char chr;
{

    /*
        Get line status and check if transmit holding register is empty
            else return TXNOTEMPTY
    */
    if (!(INPORTB(com_base + LINESTATUS) & TXHOLDEMPTY))
            return(TXNOTEMPTY);

    /*
        Else, Transmit the Character
    */
    OUTPORTB(com_base + TXBUF, (char) chr);
    return(TRUE);
}

/*
    waitforchar         -   Wait for a Character from the Serial Port

    Prototype in:       serial.h

    Parameters Passed:  void

    Return Value:       returns the receive character if successful,
                        RXERRORS if recieve errors,
                        RXTIMEOUT if a time out occurs before a
                        character is ready

    Remarks:            Routine waits for the TIMEOUTINTICKS period
                        for a character

*/
int waitforchar()
{
	short rxchar;
    long starttime;

    /*
        Get the time now in ticks
    */
    starttime = GETTICKS;

    /*          
        Wait until a character is available
        ....leave loop if errors or character available
    */
    while ((rxchar = get_serial_char()) == NODATAAVAIL)
    {
        /*
            Check to see if a timeout occured
        */
        if ((GETTICKS - starttime) > (long)((RXTIMEOUTINSECS * 1000) / TICK_MSECS))
        {
            printf("\n** ERROR ** receiver timed out\n");
            return(RXTIMEOUT);
        }
    }


    /*
        return if RX errors
    */
    if (rxchar < 0)
        return(RXERRORS);

    /*
        Everything is OK...return the character
    */
    return(rxchar);
}

/*
    waitforphase        -   Wait for a Character with phase bit set

    Prototype in:       serial.h

    Parameters Passed:  void

    Return Value:       returns the received character if successful,
                        or RXERRORS if an error occurs

    Remarks:            waits for a character to be received with the
                        most significant bit (bit 7) set to a '1'.  Characters
                        received with bit 7 = '0' are thrown away.
                        Routine waits for the TIMEOUTINTICKS period.
*/
int waitforphase()
{
	short rxchar;

    /*
        Wait until waitforchar returns a character or error
    */
    while (((rxchar = waitforchar()) & 0x80) == 0)
    {
        /*
            return if errors
        */
        if (rxchar < 0)
            return(RXERRORS);
    }

    /*
        Everything is OK...return the character
    */
    return(rxchar);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区亚洲| 99精品欧美一区二区三区小说 | 精品一区二区日韩| 欧美一区2区视频在线观看| 日日夜夜免费精品视频| 日韩欧美精品三级| 国产精品一级黄| 亚洲三级电影网站| 欧美另类videos死尸| 久久99最新地址| 国产精品高潮久久久久无| 一本大道久久a久久精二百| 亚洲国产精品综合小说图片区| 欧美日韩情趣电影| 激情图片小说一区| 自拍偷拍亚洲欧美日韩| 制服丝袜av成人在线看| 国产乱码精品1区2区3区| 中文字幕一区二区三区在线观看| 欧美专区亚洲专区| 国产一区二区三区美女| 亚洲男人的天堂网| 精品国内片67194| 99久久er热在这里只有精品66| 午夜国产精品一区| 国产精品久久久久影院色老大 | 欧美色综合网站| 精品一区二区影视| 亚洲视频每日更新| 日韩精品中文字幕一区二区三区 | 色婷婷av一区二区三区gif| 青青草伊人久久| 综合久久一区二区三区| 日韩欧美成人午夜| 色婷婷av一区| 国产福利一区在线观看| 亚洲成人动漫在线免费观看| 国产精品人妖ts系列视频| 欧美人牲a欧美精品| av中文一区二区三区| 久久国产婷婷国产香蕉| 一区二区三区在线免费| 国产日本欧美一区二区| 欧美一区二区视频观看视频| 97se亚洲国产综合自在线观| 国精产品一区一区三区mba桃花| 一区二区免费视频| 国产嫩草影院久久久久| 日韩视频在线永久播放| 在线观看亚洲精品| 成人av午夜影院| 国产精品原创巨作av| 蜜桃av一区二区| 亚洲电影中文字幕在线观看| 亚洲视频在线一区观看| 国产欧美日韩三区| 精品国产凹凸成av人网站| 欧美精品 日韩| 精品视频在线看| 在线中文字幕不卡| 国产婷婷一区二区| 一本到不卡免费一区二区| 国产不卡免费视频| 精品一区二区在线视频| 偷拍一区二区三区四区| 亚洲午夜一二三区视频| 亚洲视频中文字幕| 亚洲欧美激情视频在线观看一区二区三区| 2021久久国产精品不只是精品| 欧美日韩高清一区| 欧美精品日日鲁夜夜添| 欧美三区在线观看| 欧美亚洲综合网| 欧美亚男人的天堂| 欧美日韩国产中文| 欧美日韩久久久| 欧美日韩国产在线观看| 欧美日韩精品一区二区| 欧美色男人天堂| 欧美日产国产精品| 在线播放中文一区| 51精品国自产在线| 日韩亚洲欧美高清| 日韩欧美电影一区| 久久午夜羞羞影院免费观看| 久久综合久色欧美综合狠狠| 国产日韩欧美麻豆| 亚洲天堂久久久久久久| 亚洲色图制服诱惑 | 久久综合色天天久久综合图片| 91精品国产高清一区二区三区蜜臀| 欧美精品vⅰdeose4hd| 日韩三级.com| 亚洲国产精品二十页| 青娱乐精品在线视频| 成人av在线观| 日本精品一区二区三区高清 | 国产午夜亚洲精品午夜鲁丝片 | 精品国产91亚洲一区二区三区婷婷| 欧美电影免费观看高清完整版在| 精品日韩av一区二区| 中文字幕第一页久久| 亚洲综合偷拍欧美一区色| 日本不卡的三区四区五区| 国产精品69毛片高清亚洲| 色av成人天堂桃色av| 欧美日本国产视频| 久久精品男人天堂av| 亚洲精品国产一区二区精华液| 午夜精品久久久久久不卡8050| 国产自产2019最新不卡| 91亚洲精品久久久蜜桃网站| 欧美乱熟臀69xxxxxx| 国产网站一区二区| 亚洲国产美国国产综合一区二区| 精品一区二区三区在线视频| 91丨九色丨蝌蚪富婆spa| 欧美一区二区在线免费播放| 国产精品久久久久aaaa| 日韩国产在线观看| 99re免费视频精品全部| 日韩欧美成人一区| 一区二区不卡在线视频 午夜欧美不卡在| 五月综合激情婷婷六月色窝| 亚洲精品国产品国语在线app| 中文一区二区在线观看| 午夜激情综合网| 成人综合激情网| 欧美一区二区三区小说| 中文字幕在线观看不卡| 麻豆91在线看| 欧美婷婷六月丁香综合色| 国产日韩精品一区二区三区 | 亚洲色图19p| 国产麻豆91精品| 91精品国产综合久久小美女| 亚洲欧美自拍偷拍色图| 国产一区二区不卡在线| 在线综合视频播放| 亚洲激情在线激情| 成人永久aaa| 久久你懂得1024| 青青草国产精品亚洲专区无| 91福利资源站| 成人欧美一区二区三区视频网页 | 国产福利一区在线| 日韩欧美激情在线| 日韩电影免费在线看| 欧洲精品一区二区三区在线观看| 国产精品污网站| 国产成人免费在线| 久久久高清一区二区三区| 毛片av中文字幕一区二区| 欧美狂野另类xxxxoooo| 亚洲一级在线观看| 欧美在线观看视频一区二区三区| 成人免费在线视频观看| 成人性生交大片免费看在线播放 | 色诱视频网站一区| 亚洲欧美日韩一区二区三区在线观看| 国产一区二区视频在线播放| 欧美成人vps| 麻豆精品一区二区三区| 日韩一区二区三区视频| 亚洲高清免费一级二级三级| 欧美午夜片在线看| 亚洲丰满少妇videoshd| 欧美日韩一卡二卡三卡| 午夜伦欧美伦电影理论片| 欧美精品精品一区| 奇米影视一区二区三区| 日韩精品一区二区三区四区 | 亚洲一区二区三区三| 99热精品国产| 亚洲情趣在线观看| 色素色在线综合| 午夜激情一区二区三区| 欧美一区二区成人| 国产精品综合视频| 国产米奇在线777精品观看| 欧美日韩国产影片| 日本视频一区二区三区| 久久众筹精品私拍模特| 国产不卡免费视频| 亚洲色图色小说| 欧美久久久久久蜜桃| 麻豆精品在线观看| 中文在线免费一区三区高中清不卡| 粉嫩欧美一区二区三区高清影视| 亚洲欧洲三级电影| 欧美日韩中文一区| 国产最新精品免费| 136国产福利精品导航| 欧美视频一区二区三区在线观看| 亚洲国产成人av网| 91精品蜜臀在线一区尤物| 国产麻豆精品视频| 亚洲欧美日韩系列| 欧美一级高清片| 成人av网站在线观看|