中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > CRC工作原理及算法研究

        CRC工作原理及算法研究

        作者: 時間:2012-05-16 來源:網(wǎng)絡 收藏

         return (accum);

        本文引用地址:http://www.antipu.com.cn/article/149044.htm

          }

          /* 函數(shù)mk-crctbl利用函數(shù)crchware建立內存中的數(shù)值表 */

          unsigned short *mk-crctbl(poly,crcfn);

          unsigned short poly;/* 除數(shù)--生成多項式 */

          R>unsigned short (*crcfn)();/* 指向CRC函數(shù)(例如crchware)的指針 */

          {

          /* unsigned short */malloc(); */

          unsigned short *crctp;

          int i;

          if((crctp=(unsigned short*)malloc(256*sizeof(unsigned)))==0)

          return 0;

          for(i=0;i256;i++)

          crctp=(*crcfn)(i,poly,0);

          return crctp;

          }

          /* 函數(shù)mk-crctbl的使用范例 */

          if((crctblp=mk-crctbl(CRCCCITT,crchware))==NIL)

          {

          puts(insuff memory for CRC lookup table.n);

          return 1; */

          /* 函數(shù)crcupdate用以用查表法計算CRC值并更新CRC累加器值 */

          void crcupdate(data,accum,crctab)

          unsigned short data;/* 輸入的數(shù)據(jù) */

          unsigned short *accum;/* 指向CRC累加器的指針 */

          unsigned short *crctab;/* 指向內存中CRC表的指針 */

          {

          static short comb-val;

          comb-val=(*accum>>8)^data;

          *accum=(*accum8)^crctab[comb-val];

          }



        關鍵詞: 研究 算法 原理 工作 CRC

        評論


        相關推薦

        技術專區(qū)

        關閉