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

📄 lib.h

📁 SPCE061A是凌阳科技推出的一款16位结构的微控制器。SPCE061A内嵌32K字的闪存(FLASH)
💻 H
字号:
/* * Copyright (c) 2001, Swedish Institute of Computer Science. * All rights reserved.  * * 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 copyright  *    notice, this list of conditions and the following disclaimer.  * 2. Redistributions in binary form must reproduce the above copyright  *    notice, this list of conditions and the following disclaimer in the  *    documentation and/or other materials provided with the distribution.  * 3. Neither the name of the Institute nor the names of its contributors  *    may be used to endorse or promote products derived from this software  *    without specific prior written permission.  * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``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 INSTITUTE OR CONTRIBUTORS 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.  * * This file is part of the lwIP TCP/IP stack. *  * Author: Adam Dunkels <adam@sics.se> * * $Id: lib.h,v 1.3 2004/05/18 09:37:06 zhigang Exp $ */#ifndef __LIB_H__#define __LIB_H__#include "cc.h"u16_t htons(u16_t n);u16_t ntohs(u16_t n);u32_t htonl(u32_t n);u32_t ntohl(u32_t n);//u16_t getbyte(u16_t *data, u16_t offset);//void putbyte(u16_t *data, u8_t ch, u16_t offset);//u16_t packstrncat(u16_t *data, char *str, u16_t offset);u16_t tcp_tmr_timeout(void);u16_t dhcp_coarse_timeout(void);u16_t dhcp_fine_timeout(void);u16_t gettimeofnow(void);void PackPrint(char *pstr);//u16_t packstrlen(char *str);void PackPrintLen(char *pstr,u16_t len);//int StrToInt(char *s);void SystemServiceLoop();unsigned char getbyte(unsigned int *pdes, unsigned int offset);unsigned char getchar(char *pdes, unsigned int offset);void putbyte(unsigned int *pdes, unsigned char ch, unsigned int offset);void putchar(char *pdes, unsigned char ch);unsigned int packstrcat(char *pdes, char *src);unsigned int packstrncat(char *pdes, char *src, unsigned int count);unsigned int ppackstrcat(char *pstrDest,   char *pstrSource);unsigned int ppackstrcat_m(char *pstrDest,   char *pstrSource,							unsigned int SrcOffset);unsigned int ppackstrncat(char *pstrDest,   char *pstrSource, unsigned int count );unsigned int ppackstrncat_m(char *pstrDest,   char *pstrSource ,                         unsigned int SrcOffset,unsigned int count);unsigned int ppackstrncat_mn(char *pstrDest,   char *pstrSource , unsigned int DestOffset,                         unsigned int SrcOffset,unsigned int count);                         unsigned int packstrlen(char *pstr);int packstrcmp(char *des,char *src);int packstrncmp_n(  char *pdes,  char *psrc,unsigned int n,unsigned int count);int packstrncmp(  char *des,  char *src,unsigned int count);int StrToInt(char *s);unsigned int packstrcspn(  char *pstring,   char *pstrCharSet);unsigned int packstrcspn_m(  char *pstring,   char *pstrCharSet,unsigned int m);unsigned int ppackstrncpy(char *pstrDest,char *pstrSource,unsigned int count);unsigned int ppackstrncpy_m(char *pstrDest,char *pstrSource,unsigned int SrcOffset,unsigned int count);unsigned int ppackstrcpy_m(char *pstrDest,char *pstrSource,							unsigned int SrcOffset);unsigned int ppackstrcpy(char *pstrDest,char *pstrSource);							#endif /* __LIB_H__ */

⌨️ 快捷键说明

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