⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 f.c

📁 实现在ARM上的ICP/IP功能的源代码。
💻 C
字号:
#include "typedef.h"
#include "utilities.h"
#include "ip.h"
u16_t chkum(u16_t *dataptr,u16_t len,u32_t acc)
{
for(;len>1;len-=2)
acc+=*(u16_t*)dataptr++;
if(len&1){
acc+=htons((u16_t)((*(u8_t*)dataptr)&0xff)<<8);
Uart_Printf("\nLWIPCS: there is an odd no...\n");
}
acc=(acc>>16)+(acc&0xffff);
acc+=(acc>>16);
return ((~acc)&0xffff);
}/*验证通过*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -