资源简介
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
相关资源
- C语言的32个关键字、9种控制语句、
- C语言32个关键字九种控制语句34种运算
- C语言课程设计 体育馆预约系统
- VC++获取系统信息/获取OS/获取MAC/获取
- VC++五子棋程序源码VC6.0控制台下运行
- 门限秘密分享算法C实现
- VC++编写USB接口通信程序
- 基于DSP2812的SVPWM算法C语言编程
- 三次样条差值C语言程序,亲测有用!
-
MFC、DOM实现的xm
l文件解析、修改和 - C语言试题库含答案.rar
- vc++ tcp 客户端和服务器端
- 参考资料\\C++获取MP3文件信息.doc
- 简单的停车场收费 c++
- JPEG图片EXIF信息提取及缩略图显示VC
- C语言课程设计学生成绩管理系统源码
- 数字信号处理的函数库
- shell.rar,一个用c++实现的具有基本完
- socket通信MFC版本
- 分治法解决凸包问题用C语言递归调用
- 178个经典C语言源代码
- LMSE(Ho-Kashyap).rar
- VS2010 C++配色方案 主题
- Opencv2.4.12 SVM手写数字识别
- Qt-C++实现文件浏览器
- BASIC语言编程初学者手册
- C语言socket编程指南(讲解+)
- JPEG源码(C语言实现)
- c++ MFC实现文件合成器功能,实现多种
- STC单片机与si4432C语言程序
评论
共有 条评论