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

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

?? gentable.c

?? CRC16的源程序
?? C
字號:
/*************************************************************************
 * Embedded System CRC16 Table Generator
 *
 * By Ashley Roll
 * Digital Nemesis Pty Ltd
 * www.digitalnemesis.com
 * ash (at) digitalnemesis (dot) com 
 *
 * To generate a CRC16 value efficiently, one needs to use a table 
 * driven algorithm. The generation of these tables fairly simple but
 * the code is often hard to find and is almost always designed for
 * generating a 256 entry table for operating on 8bits at a time.
 * 
 * In Embedded Systems there are often severe space limitations and a full
 * table of 256 16 bit entries would never fit. However the CRC16 algorithm
 * does not require such a large table to work. It can be done smaller.
 *
 * On the PIC micro processors, a nibble (4bit) implementation can be
 * achieved fairly easily and this requres only a table of 16 16bit values
 * or 32 bytes.
 *
 * This code was developed from the explanations and examples at
 * http://www.geocities.com/SiliconValley/Pines/8659/crc.htm This is a 
 * good reference for those wanting to understand what is happening in
 * the CRC algorithm.
 *
 * A few notes about terms:
 *
 * The "Message" is the series of data bytes that are being feed in. These
 * are fed in Most-Significant-Bit first of the first byte first.
 *
 * I've used the Standard CCITT CRC16 polynomial as this "standard"
 * doesn't use any of the bit reflection that confuses the implementation.
 * This polynomial is 0x1021 but you could use any you like.
 *
 * When implemented properly, a 4bit table will give the same result as a
 * 8 bit table, so on the microprocessor side you can use a 4 bit table to 
 * save space and on the host side (PC) you can use a 8 bit table for speed.
 *
 * The lookup table is generated by calling GenCRC16TableEntry() with
 * index being the index in the table, NumBits the width of the lookup
 * table, eg 4 or 8. and Poly being the polynomial being used.
 *
 * Note that GenCRC16TableEntry returns a 16 bit number. This may have to
 * be slit into high and low bytes for implementation on some processors
 * like the PIC which can only support 8 bit values in tables.
 *
 *************************************************************************/

#include <stdio.h>
#include <string.h>


#include "ex4bit.c"
void DoTestVector();

/*
 * Calculate the value to XOR into the shifted CRC register for the given index
 * NumBits should be the "width" of the chunk being operated on eg: 4 or 8. Poly
 * is the polynomial to use eg 0x1021
 */
unsigned short GenCRC16TableEntry( const unsigned short index, const short NumBits, const unsigned short Poly )
{
	int i;
	unsigned short Ret;
		
	// Prepare the initial setup of the register so the index is at the
	// top most bits.
	Ret = index;
	Ret <<= 16 - NumBits;

	for( i = 0; i < NumBits; i++ ) {
		if( Ret & 0x8000 )
			Ret = (Ret << 1) ^ Poly;
		else 
			Ret = Ret << 1;
	}
	
	return Ret;
}

/*
 * The following Defines are used to configure the table generator
 */
#define NUM_BITS 4			// Width of message chunk each iteration of the CRC algorithm
#define POLYNOMIAL 0x1021	// The Polynomial (0x1021 is the CCITT standard one)

main() {
	unsigned short i, Count, te;
	
	// Setup the values to compute the table
	Count = 1 << NUM_BITS;		// Number of entries in the table
	
	// Generate the WORD width table
	printf("/* CRC16 Lookup table for %u bits per iteration. Full WORD per entry */\r\n", NUM_BITS );
	printf("unsigned short CRC16_Lookup[%u] = {", Count );

	for( i = 0; i < Count; i++ ) {
		if( (i % 8) == 0 )
			printf("\r\n\t");

		te = GenCRC16TableEntry( i, NUM_BITS, POLYNOMIAL );
		printf("0x%04X", te);

		if( i+1 != Count )
			printf(", ");
	}
	printf("\r\n};\r\n", Count );

	// Generate the HIGH byte table
	printf("/* CRC16 Lookup tables (High and Low Byte) for %u bits per iteration. */\r\n", NUM_BITS );
	printf("unsigned short CRC16_LookupHigh[%u] = {", Count );

	for( i = 0; i < Count; i++ ) {
		if( (i % 8) == 0 )
			printf("\r\n\t");

		te = GenCRC16TableEntry( i, NUM_BITS, POLYNOMIAL );
		printf("0x%02X", (unsigned char)(te >> 8));

		if( i+1 != Count )
			printf(", ");
	}
	printf("\r\n};\r\n", Count );

	// Generate the LOW byte table
	printf("unsigned short CRC16_LookupLow[%u] = {", Count );

	for( i = 0; i < Count; i++ ) {
		if( (i % 8) == 0 )
			printf("\r\n\t");

		te = GenCRC16TableEntry( i, NUM_BITS, POLYNOMIAL );
		printf("0x%02X", (unsigned char)(te & 0x00FF));

		if( i+1 != Count )
			printf(", ");
	}
	printf("\r\n};\r\n", Count );

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一区二区三区影院 | 成人app软件下载大全免费| 欧美videofree性高清杂交| 免费成人在线视频观看| 欧美大尺度电影在线| 国产乱淫av一区二区三区| 欧美国产精品v| 一本到不卡免费一区二区| 午夜精品久久久久久久99水蜜桃| 91麻豆精品国产91久久久久| 欧美日韩亚洲综合一区二区三区| 91亚洲男人天堂| 欧美午夜精品久久久久久孕妇| 色偷偷成人一区二区三区91 | 国产成人精品一区二区三区四区| 日韩精品国产精品| 国产成人午夜视频| 国产一区二区三区久久久| 欧美一区二区三区视频免费| 麻豆精品国产91久久久久久| 欧美国产日产图区| 欧洲国内综合视频| 激情六月婷婷综合| 亚洲人一二三区| 日韩小视频在线观看专区| 成人黄色在线视频| 热久久国产精品| 国产精品免费网站在线观看| 欧美日韩一卡二卡三卡 | av中文字幕亚洲| 午夜久久久久久久久| 久久久国产精品午夜一区ai换脸| 91美女在线看| 狠狠色丁香婷婷综合| 一二三区精品福利视频| 久久午夜免费电影| 欧美日本一区二区三区四区| 国产激情91久久精品导航| 亚洲一区二区在线免费看| 久久久99久久精品欧美| 欧美日韩国产免费| 不卡视频免费播放| 亚洲精品免费在线| 欧美性大战久久| 亚洲成人av电影| 成人免费在线观看入口| 美女视频黄 久久| 欧美日韩精品欧美日韩精品一 | 亚洲午夜久久久久久久久电影院| 97国产一区二区| 一区二区三区.www| 欧美日韩免费视频| 91浏览器入口在线观看| 国产一区二区三区蝌蚪| 午夜精品久久久久久久| 专区另类欧美日韩| 久久精品视频在线看| 欧美午夜在线观看| 99视频在线观看一区三区| 国内一区二区视频| 美女久久久精品| 视频一区欧美精品| 亚洲一区二区在线免费观看视频| 国产精品系列在线| 国产欧美视频在线观看| 26uuu精品一区二区三区四区在线| 欧美日韩一区二区不卡| 在线一区二区三区四区五区| 99精品视频在线免费观看| 国产在线视视频有精品| 国精产品一区一区三区mba桃花 | 欧美大度的电影原声| 91精品国产色综合久久不卡电影| 欧美午夜片在线看| 欧美日韩国产综合一区二区三区| 在线免费视频一区二区| 欧美亚洲综合久久| 欧美日韩国产高清一区二区| 欧美日韩dvd在线观看| 欧美日韩一区二区三区在线| 欧美日韩专区在线| 欧美日韩亚洲另类| 欧美美女bb生活片| 日韩精品一区在线| 26uuu精品一区二区在线观看| 久久久久久久久久久久久女国产乱| 欧美tk—视频vk| 欧美国产激情二区三区| 国产精品免费久久| 一区二区三区.www| 日本麻豆一区二区三区视频| 久久国产麻豆精品| 国产成人自拍高清视频在线免费播放| 风间由美性色一区二区三区| 成人99免费视频| 欧美视频日韩视频在线观看| 欧美一级精品大片| 国产亚洲欧洲一区高清在线观看| 国产精品网站导航| 亚洲影视在线观看| 美女网站一区二区| 国产91清纯白嫩初高中在线观看| 91视视频在线直接观看在线看网页在线看 | 中文字幕一区免费在线观看| 亚洲理论在线观看| 青椒成人免费视频| 国产一区二区在线观看免费| 91原创在线视频| 91精品欧美综合在线观看最新| 久久综合久久99| 亚洲精品一二三| 免费看日韩精品| 成人激情文学综合网| 亚洲小少妇裸体bbw| 国产精品久久久久久久午夜片| 18成人在线观看| 亚洲国产精品久久不卡毛片| 免费欧美日韩国产三级电影| 91美女精品福利| 欧美一二三四区在线| 日韩美女主播在线视频一区二区三区| 亚洲精品一区二区三区99| 国产精品伦一区| 午夜视黄欧洲亚洲| 国产精一品亚洲二区在线视频| av在线不卡观看免费观看| 3d成人h动漫网站入口| 久久久99久久| 性感美女极品91精品| 国产成人自拍网| 3751色影院一区二区三区| 亚洲综合色视频| 国产99久久久久| 精品一区二区三区在线观看国产| 捆绑调教美女网站视频一区| 白白色 亚洲乱淫| 精品剧情在线观看| 色94色欧美sute亚洲线路二 | 国产女主播在线一区二区| 亚洲一二三区视频在线观看| 国产成人午夜视频| 日韩一卡二卡三卡国产欧美| 亚洲精品成人精品456| 成人在线一区二区三区| 91麻豆精品91久久久久同性| 亚洲精品少妇30p| 不卡大黄网站免费看| 国产又粗又猛又爽又黄91精品| 欧美在线视频你懂得| 国产拍欧美日韩视频二区| 国产九九视频一区二区三区| 26uuu亚洲综合色| 国产不卡免费视频| 国产人妖乱国产精品人妖| 国模无码大尺度一区二区三区| 国产日韩一级二级三级| 一本到不卡免费一区二区| 色狠狠av一区二区三区| 欧美理论在线播放| 精品日韩在线观看| 国产精品女上位| 一区二区三区高清不卡| 亚洲综合丝袜美腿| 久久国产福利国产秒拍| 亚洲精品视频免费观看| 亚洲中国最大av网站| 国产成人8x视频一区二区 | 视频一区在线播放| 亚洲一区av在线| 精一区二区三区| 波多野结衣欧美| 欧美一区二区三区影视| 欧美激情综合在线| 天天综合天天综合色| 国产一区二区视频在线播放| 91小视频在线免费看| 在线播放/欧美激情| 国产精品久久久久三级| 亚洲成在人线在线播放| 丁香五精品蜜臀久久久久99网站| 欧美视频一区二区三区| 国产欧美视频一区二区| 午夜精品成人在线视频| 成人福利在线看| 日韩欧美国产综合一区| 亚洲一卡二卡三卡四卡| 不卡的电影网站| 日本一区二区不卡视频| 美国十次了思思久久精品导航| 色婷婷综合中文久久一本| 国产欧美日韩久久| 激情综合色丁香一区二区| 在线看日韩精品电影| 亚洲伦理在线精品| 91在线免费看| 亚洲精品欧美激情| 国产在线国偷精品产拍免费yy | 国产精品久久久久久福利一牛影视| 精品精品国产高清一毛片一天堂| 91丨九色丨黑人外教|