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

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

?? probe_com.c

?? 飛思卡爾HCS12的OS移植(ucosII),實現了三個任務,IDE:CODEWARRIOR
?? C
?? 第 1 頁 / 共 5 頁
字號:
*                                           ProbeCom_CmdInfo()
*
* Description : Parse the FMT_INFO command & formulate response.  This command supplies information
*               to the target about the Windows program's capabilitied & configuration.
*
* Argument(s) : prx_buf         Pointer to the receive  buffer
*
*               ptx_buf         Pointer to the transmit buffer
*
*               rx_pkt_size     Size of the receive  packet
*
*               tx_buf_size     Size of the transmit buffer
*
* Return(s)   : The number of bytes written to the tx buffer.
*
* Caller(s)   : ProbeCom_ParseRxPkt().
*
* Note(s)     : (1) The RX format:
*
*                   (A) A 2-byte format, indicating the data segment format;
*                   (B) A 2-byte info  , indicating the type of the info packet;
*                   (C) A 4-byte data  , the packet data.
*
*                         +-------------------------+-------------------------+
*                         |          Format         |          Info           |
*                         +-------------------------+-------------------------+
*                         |                       Data                        |
*                         +---------------------------------------------------+
*
*              (2) The TX format:
*
*                   (A) A 2-byte format, indicating the data segment format;
*                   (B) A 1-byte status, indicating the status after the request;
*                   (C) A 1-byte modifier.
*
*                         +-------------------------+------------+------------+
*                         |          Format         |   Status   |  Modifier  |
*                         +-------------------------+------------+------------+
*                         |                       Answer                      |
*                         |                         .                         |
*                         |                         .                         |
*                         |                         .                         |
*                         +---------------------------------------------------+
*
*********************************************************************************************************
*/

static  CPU_INT16U  ProbeCom_CmdInfo (CPU_INT08U  *prx_buf,
                                      CPU_INT08U  *ptx_buf,
                                      CPU_INT16U   rx_pkt_size,
                                      CPU_INT16U   tx_buf_size)
{
    CPU_INT16U                 info;
    CPU_INT32U                 data;
    PROBE_COM_INFO_HDNLR_FNCT  hndlr;
#if (CPU_CFG_CRITICAL_METHOD == CPU_CRITICAL_METHOD_STATUS_LOCAL)
    CPU_SR                     cpu_sr;
#endif


                                                                /* ------------------- CHK PKT SIZE ------------------- */
                                                                /* Expected size = 2 (= Rx header size)                 */
                                                                /*               + 2 (= Info          )                 */
                                                                /*               + 4 (= Data          ).                */
    if (rx_pkt_size != 8) {
        return (ProbeCom_CmdErr(ptx_buf, PROBE_COM_STATUS_RX_PKT_WRONG_SIZE));
    }
                                                                /* ------------------- HANDLE INFO -------------------- */
    CPU_CRITICAL_ENTER();
    hndlr = ProbeCom_InfoHndlr;
    CPU_CRITICAL_EXIT();
    if (hndlr != (PROBE_COM_INFO_HDNLR_FNCT)0) {                /* Invoke callback if callback is set.                  */
        info = ProbeCom_GetINT16U(&prx_buf);
        data = ProbeCom_GetINT32U(&prx_buf);
        hndlr(info, data);
    }

                                                                /* Store TX pkt hdr :                                   */
    ProbeCom_StoINT16U(&ptx_buf, PROBE_COM_FMT_TX_INFO);        /*  (a) TX pkt format.                                  */
    ProbeCom_StoINT8U( &ptx_buf, PROBE_COM_STATUS_OK);          /*  (b) Target status.                                  */
    ProbeCom_StoINT8U( &ptx_buf, ProbeCom_PktModifier());       /*  (c) Modifier.                                       */

                                                                /* ------------------ RTN TX PKT SIZE ----------------- */
    return ((CPU_INT16U)(PROBE_COM_SIZE_TX_HDR));               /* Tx pkt size = 4 (= Tx header size).                  */
}


/*
*********************************************************************************************************
*                                         ProbeCom_CmdSimpleRd()
*
* Description : Parse the FMT_SIMPLE_RD request & formulate response.  This command causes the target
*               to send data read from its memory for a certain {memory address, data length} pair (which
*               is given in the request).
*
* Argument(s) : prx_buf         Pointer to the receive  buffer
*
*               ptx_buf         Pointer to the transmit buffer
*
*               rx_pkt_size     Size of the receive  packet
*
*               tx_buf_size     Size of the transmit buffer
*
* Return(s)   : The number of bytes written to the tx buffer.
*
* Caller(s)   : ProbeCom_ParseRxPkt().
*
* Note(s)     : (1) The RX format:
*
*                   (A) A 2-byte format , indicating the data segment format;
*                   (B) A 2-byte length , indicating the number of bytes to read;
*                   (C) A 4-byte address, the starting address of the data to read.
*
*                         +-------------------------+-------------------------+
*                         |          Format         |     Number of bytes     |
*                         +-------------------------+-------------------------+
*                         |                      Address                      |
*                         +-------------------------+-------------------------+
*
*               (2) The TX format:
*
*                   (A) A 2-byte format, indicating the data segment format;
*                   (B) A 1-byte status, indicating the status after the request;
*                   (C) A 1-byte modifier;
*                   (D) The memory data.
*
*                         +-------------------------+------------+------------+
*                         |          Format         |   Status   |  Modifier  |
*                         +-------------------------+------------+------------+
*                         |                        Data                       |
*                         |                         .                         |
*                         |                         .                         |
*                         |                         .                         |
*                         +---------------------------------------------------+
*
*********************************************************************************************************
*/

static  CPU_INT16U  ProbeCom_CmdSimpleRd (CPU_INT08U  *prx_buf,
                                          CPU_INT08U  *ptx_buf,
                                          CPU_INT16U   rx_pkt_size,
                                          CPU_INT16U   tx_buf_size)
{
    CPU_ADDR     addr;
    CPU_INT16U   nbytes;


    addr   = 0;
    nbytes = 0;

                                                                /* ------------------- CHK PKT SIZE ------------------- */
                                                                /* Expected size = 2 (= Rx header size )                */
                                                                /*               + 2 (= Number of bytes)                */
                                                                /*               + 4 (= Address        ).               */
    if (rx_pkt_size != 8) {
        return (ProbeCom_CmdErr(ptx_buf, PROBE_COM_STATUS_RX_PKT_WRONG_SIZE));
    }


                                                                /* -------------------- HANDLE RD --------------------- */
    nbytes = ProbeCom_GetINT16U(&prx_buf);                      /* Get nbr of bytes to read.                            */

                                                                /* Get read addr.                                       */
#if ((!defined(CPU_CFG_ADDR_SIZE)) || \
     ((defined(CPU_CFG_ADDR_SIZE)) && \
              (CPU_CFG_ADDR_SIZE   != CPU_WORD_SIZE_16)))
    addr   = (CPU_ADDR)ProbeCom_GetINT32U(&prx_buf);
#else
    addr   = (CPU_ADDR)ProbeCom_GetINT16U(&prx_buf);
#endif

    if (nbytes + PROBE_COM_SIZE_TX_HDR > tx_buf_size) {         /* If TX pkt will NOT fit in buf, rtn err.            */
        return (ProbeCom_CmdErr(ptx_buf, PROBE_COM_STATUS_TX_PKT_TOO_LARGE));
    }

#if (PROBE_COM_STAT_EN == DEF_ENABLED)
    ProbeCom_TxSymCtr++;                                        /* Increment transmit symbol counter.                   */
    ProbeCom_TxSymByteCtr += nbytes;
#endif

                                                                /* Store TX pkt hdr :                                   */
    ProbeCom_StoINT16U(&ptx_buf, PROBE_COM_FMT_TX_SIMPLE_RD);   /*  (a) TX pkt format.                                  */
    ProbeCom_StoINT8U( &ptx_buf, PROBE_COM_STATUS_OK);          /*  (b) Target status.                                  */
    ProbeCom_StoINT8U( &ptx_buf, ProbeCom_PktModifier());       /*  (c) Modifier.                                       */

    Mem_Copy((void     *)ptx_buf,                               /* Save TX data segment data.                           */
             (void     *)addr,
             (CPU_SIZE_T)nbytes);

                                                                /* ------------------ RTN TX PKT SIZE ----------------- */
    return ((CPU_INT16U)(nbytes + PROBE_COM_SIZE_TX_HDR));      /* TX pkt size = nbytes (= Tx data   size)              */
                                                                /*             + 4      (= Tx header size).             */
}


/*
*********************************************************************************************************
*                                        ProbeCom_CmdMultipleRd()
*
* Description : Parse the FMT_MULTIPLE_RD request & formulate respnse.  This command causes the target
*               to send data read from its memory for a certain set of {memory address, data length}
*               pairs (which are given in the request).
*
* Argument(s) : prx_buf         Pointer to the receive  buffer
*
*               ptx_buf         Pointer to the transmit buffer
*
*               rx_pkt_size     Size of the receive  packet
*
*               tx_buf_size     Size of the transmit buffer
*
* Return(s)   : The number of bytes written to the tx buffer.
*
* Caller(s)   : ProbeCom_ParseRxPkt().
*
* Note(s)     : (1) The RX format:
*
*                   (A) A 2-byte format,          indicating the data segment format;
*                   (B) A 5-byte item descriptor, for each item in the list, consisting of:
*
*                       (1) A 4-byte address, the starting address of the data to read;
*                       (2) A 1-byte length,  indicating the number of bytes to read.
*
*                         +-------------------------+------------+------------+
*                         |          Format         | Num. bytes |         Addr       ---
*                         +-------------------------+------------+------------+        |    Item 1
*                         ress                                   | Num. bytes |       ---
*                         +--------------------------------------+------------+        |
*                         |                      Address                      |        |    Item 2
*                         +------------+--------------------------------------+       ---
*                         | Num. bytes |                                   Addr        |    Item 3
*                         +------------+--------------------------------------+        .
*                         |                         .                         |        .
*                         |                         .                         |        .
*                         |                         .                         |        .
*                         |                         .                         |        .
*                         +--------------------------------------+------------+        .
*                         ress                                   | Num. bytes |       ---
*                         ---------------------------------------+------------+        |   Item n
*                         |                      Address                      |        |
*                         +---------------------------------------------------+       ---
*
*               (2) The TX format:
*
*                   (A) A 2-byte format, indicating the data segment format;
*                   (B) A 1-byte status, indicating the status after the request;
*                   (C) A 1-byte modifier;
*                   (D) For each item, the following is sent:
*
*                       (1) The memory data.
*
*                         +-------------------------+------------+------------+
*                         |          Format         |   Status   |  Modifier  |
*                         +-------------------------+------------+------------+       ---
*                         |                        Data                       |        |    Item 1
*                         |                         .                         |        |
*                         |                         .                         |        |
*                         |                         .                         |        |
*                         +---------------------------------------------------+       ---
*                         |                         .                         |        .
*                         |                         .                         |        .
*                         |                         .                         |        .
*                         |                         .                         |        .
*                         |                         .                         |        .
*                         +---------------------------------------------------+       ---
*                         |                        Data                       |        |    Item n
*                         |                         .                         |        |
*                         |                         .                         |        |
*                         |                         .                         |        |
*                         +---------------------------------------------------+       ---
*
*********************************************************************************************************
*/

static  CPU_INT16U  ProbeCom_CmdMultipleRd (CPU_INT08U  *prx_buf,
                                            CPU_INT08U  *ptx_buf,
                                            CPU_INT16U   rx_pkt_size,
                                            CPU_INT16U   tx_buf_size)
{
    CPU_INT08U  *ptx_buf_start;
    CPU_INT16U   tx_len;

    CPU_ADDR     addr;
    CPU_INT16U   nbytes;
    CPU_INT16U   rx_pkt_ix;

#if (PROBE_COM_STAT_EN == DEF_ENABLED)
    CPU_INT16U   sym_ctr;
    CPU_INT16U   sym_byte_ctr;
#endif


                                                                /* ------------------- CHK PKT SIZE ------------------- */
                                                                /* Expected size >= 2 (= Rx header

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99天天综合性| 中文字幕亚洲电影| 中文字幕精品一区二区三区精品| 亚洲精品视频一区二区| 久久aⅴ国产欧美74aaa| 欧美在线免费观看亚洲| 国产精品你懂的| 黄色日韩网站视频| 欧美日精品一区视频| 国产精品麻豆欧美日韩ww| 蜜臀av性久久久久蜜臀aⅴ四虎| 91看片淫黄大片一级| 国产欧美日产一区| 国产精品99久久久久久似苏梦涵 | 7799精品视频| 亚洲欧美偷拍卡通变态| 国产99久久久国产精品潘金网站| 欧美综合亚洲图片综合区| 国产精品天干天干在线综合| 国产一区二区三区最好精华液| 777亚洲妇女| 日韩成人一区二区三区在线观看| 91福利小视频| 亚洲一卡二卡三卡四卡| 96av麻豆蜜桃一区二区| 亚洲欧洲成人av每日更新| 不卡视频免费播放| 最新日韩在线视频| 91福利在线导航| 图片区小说区区亚洲影院| 在线视频欧美区| 亚洲在线视频一区| 欧美狂野另类xxxxoooo| 日日摸夜夜添夜夜添亚洲女人| 欧美中文一区二区三区| 亚洲v精品v日韩v欧美v专区| 精品视频全国免费看| 午夜伦理一区二区| 日韩一区二区视频| 韩国欧美一区二区| 国产三级一区二区三区| 成人av影院在线| 亚洲精品中文在线| 欧美精品乱码久久久久久| 偷窥国产亚洲免费视频| 日韩三级电影网址| 国产成人午夜精品5599| **网站欧美大片在线观看| 色av综合在线| 美国av一区二区| 欧美激情一区二区三区四区| 97se亚洲国产综合自在线不卡 | 天天色天天爱天天射综合| 91精品福利在线一区二区三区 | 99久久久免费精品国产一区二区| 亚洲欧美偷拍三级| 欧美一区二区大片| 成人午夜电影小说| 亚洲国产婷婷综合在线精品| 日韩欧美国产一二三区| 懂色av一区二区夜夜嗨| 亚洲国产一区二区三区青草影视| 日韩一卡二卡三卡国产欧美| 国产成人午夜精品5599| 亚洲国产精品精华液网站| 精品国产欧美一区二区| a4yy欧美一区二区三区| 麻豆精品新av中文字幕| **欧美大码日韩| 欧美r级电影在线观看| 日本乱人伦一区| 国产一区二区三区av电影| 亚洲激情校园春色| 精品va天堂亚洲国产| 91视频国产观看| 国产一区二区美女诱惑| 亚洲成av人片在线观看无码| 日韩欧美国产1| 色先锋aa成人| 国产成人精品综合在线观看 | 久久精品综合网| 欧美丰满少妇xxxxx高潮对白| 国产成人免费视频一区| 午夜久久福利影院| 亚洲精品中文字幕乱码三区| 久久久久国产精品厨房| 在线电影欧美成精品| 91最新地址在线播放| 国产精品一区二区视频| 日韩成人伦理电影在线观看| 国产精品久久久久aaaa| 在线播放欧美女士性生活| 91国模大尺度私拍在线视频| 国产精品影音先锋| 久久精品国产免费| 丝袜美腿亚洲综合| 亚洲制服丝袜av| 中文字幕在线免费不卡| 国产三区在线成人av| 26uuu亚洲综合色欧美| 日韩天堂在线观看| 欧美一级生活片| 欧美色精品在线视频| 91免费版在线| 91小视频免费观看| 99久久婷婷国产综合精品| 国产传媒久久文化传媒| 国产一区二区三区在线观看精品 | 成人一区二区三区中文字幕| 婷婷综合另类小说色区| 天堂av在线一区| 欧美aaaaaa午夜精品| 麻豆精品国产91久久久久久| 日韩电影免费在线看| 蜜臀国产一区二区三区在线播放| 亚洲成a人片在线观看中文| 亚洲精品成人精品456| 日韩美女啊v在线免费观看| 国产精品乱人伦| 国产精品美女久久久久久久久久久 | 九色|91porny| 国产一区二区三区观看| 国产成人久久精品77777最新版本| 国产成人免费av在线| 99久久久无码国产精品| 在线一区二区三区| 欧美人妖巨大在线| 精品久久久久久久久久久久久久久久久| 这里只有精品免费| 精品国产乱码久久久久久久久| 久久久av毛片精品| 中文字幕中文字幕一区二区| 亚洲免费资源在线播放| 亚洲午夜国产一区99re久久| 男男gaygay亚洲| 国产成人一区二区精品非洲| 91蜜桃婷婷狠狠久久综合9色| 日本高清不卡aⅴ免费网站| 欧美高清视频不卡网| 久久久一区二区三区捆绑**| 国产精品伦理在线| 午夜久久久影院| 国产精品一区二区久久不卡 | 日韩精品中文字幕在线不卡尤物 | 精品欧美一区二区在线观看| 久久综合九色综合97婷婷| 国产精品久久二区二区| 亚洲国产综合色| 国产电影一区在线| 欧美色倩网站大全免费| 久久久久国产精品麻豆ai换脸| 亚洲精品久久嫩草网站秘色| 免费观看在线综合| 91日韩一区二区三区| 日韩欧美在线123| 一区视频在线播放| 精品一区二区三区久久| 91免费观看视频在线| 精品国产成人在线影院| 一区二区三区高清| 国产精品一区二区在线看| 欧美日韩一区二区三区四区五区| 久久综合国产精品| 日韩在线一二三区| 色婷婷综合激情| 国产午夜亚洲精品羞羞网站| 香蕉成人伊视频在线观看| 成人国产精品免费观看动漫| 91精品国产综合久久婷婷香蕉| 中文字幕在线不卡视频| 精品亚洲国产成人av制服丝袜| 欧美性猛交xxxxxx富婆| 欧美国产日韩亚洲一区| 麻豆精品一区二区三区| 欧美日韩精品福利| 一区二区三区在线视频免费| 国产99久久久国产精品免费看 | 欧美日韩国产高清一区| 中文字幕一区二区三中文字幕| 国产真实乱子伦精品视频| 欧美放荡的少妇| 亚洲午夜久久久久久久久久久| 成人av资源下载| 久久伊人蜜桃av一区二区| 日本大胆欧美人术艺术动态| 欧美色图片你懂的| 一个色在线综合| 91小视频在线| 亚洲少妇30p| 一本色道久久综合亚洲91| 国产精品―色哟哟| 国产69精品久久99不卡| 久久久精品一品道一区| 国产在线看一区| 久久精品人人爽人人爽| 国产河南妇女毛片精品久久久| 精品国产污网站| 国产成人一级电影| 国产精品国产三级国产aⅴ原创| 粉嫩aⅴ一区二区三区四区|