資源簡介
1.用C語言實現了XMODEM協議:128byte/packet, 支持CRC/Checksum
2.在freescale開發板TWR-K60F120M上測試通過
3.用tera term,hyper terminal,secureCRT測試通過

代碼片段和文件信息
/**************************************************************************
*?
*?Written?by?Cencong?Su?(cencong.su@gmail.com)
*
***************************************************************************
*?Redistribution?and?use?in?source?and?binary?forms?with?or?without?modification?
*?are?permitted?provided?that?the?following?conditions?are?met:
*
*?1.?Redistributions?of?source?code?must?retain?the?above?author?notice
*????this?list?of?conditions?and?the?following?disclaimer.
*?2.?Redistributions?in?binary?form?must?reproduce?the?above?author?notice
*????this?list?of?conditions?and?the?following?disclaimer?in?the?documentation
*????and/or?other?materials?provided?with?the?distribution.
*?3.?The?name?of?the?author?may?not?be?used?to?endorse?or?promote?products
*????derived?from?this?software?without?specific?prior?written?permission.?
*
*?THIS?SOFTWARE?IS?PROVIDED?BY?THE?AUTHOR?‘‘AS?IS‘‘?AND?ANY?EXPRESS?OR?IMPLIED?
*?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE?IMPLIED?WARRANTIES?OF?
*?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE?ARE?DISCLAIMED.?IN?NO?EVENT?
*?SHALL?THE?AUTHOR?BE?LIABLE?FOR?ANY?DIRECT?INDIRECT?INCIDENTAL?SPECIAL?
*?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES?(INCLUDING?BUT?NOT?LIMITED?TO?PROCUREMENT?
*?OF?SUBSTITUTE?GOODS?OR?SERVICES;?LOSS?OF?USE?DATA?OR?PROFITS;?OR?BUSINESS?
*?INTERRUPTION)?HOWEVER?CAUSED?AND?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN?
*?CONTRACT?STRICT?LIABILITY?OR?TORT?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?
*?IN?ANY?WAY?OUT?OF?THE?USE?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?
*?OF?SUCH?DAMAGE.
*
**********************************************************************//*!
*
*?@file?crc16.c
*
*?@author?Cencong?Su
*
*?@brief?CRC16?implementation?acording?to?CCITT?standards
*
***************************************************************************/
#include?“crc16.h“
static?const?unsigned?short?crc16tab[256]=?
{
0x00000x10210x20420x30630x40840x50a50x60c60x70e7
0x81080x91290xa14a0xb16b0xc18c0xd1ad0xe1ce0xf1ef
0x12310x02100x32730x22520x52b50x42940x72f70x62d6
0x93390x83180xb37b0xa35a0xd3bd0xc39c0xf3ff0xe3de
0x24620x34430x04200x14010x64e60x74c70x44a40x5485
0xa56a0xb54b0x85280x95090xe5ee0xf5cf0xc5ac0xd58d
0x36530x26720x16110x06300x76d70x66f60x56950x46b4
0xb75b0xa77a0x97190x87380xf7df0xe7fe0xd79d0xc7bc
0x48c40x58e50x68860x78a70x08400x18610x28020x3823
0xc9cc0xd9ed0xe98e0xf9af0x89480x99690xa90a0xb92b
0x5af50x4ad40x7ab70x6a960x1a710x0a500x3a330x2a12
0xdbfd0xcbdc0xfbbf0xeb9e0x9b790x8b580xbb3b0xab1a
0x6ca60x7c870x4ce40x5cc50x2c220x3c030x0c600x1c41
0xedae0xfd8f0xcdec0xddcd0xad2a0xbd0b0x8d680x9d49
0x7e970x6eb60x5ed50x4ef40x3e130x2e320x1e510x0e70
0xff9f0xefbe0xdfdd0xcffc0xbf1b0xaf3a0x9f590x8f78
0x91880x81a90xb1ca0xa1eb0xd10c0xc12d0xf14e0xe16f
0x10800x00a10x30c20x20e30x50040x40250x70460x6067
0x83b90x93980xa3fb0xb3da0xc33d0xd31c0x
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????4050??2016-05-03?17:02??crc16.c
?????文件????????1961??2016-05-03?17:02??crc16.h
?????文件???????11966??2016-05-03?17:27??xmodem.c
?????文件????????3336??2016-05-03?17:01??xmodem.h
評論
共有 條評論