打印

请问中颖提供的库

[复制链接]
2045|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
高建明|  楼主 | 2010-6-19 18:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
目前本人使用了sinolib.lib库函数,发现其头文件中有些不太看得懂,希望版主能解释一下。(特别是最后的对于指针的操作)
/*;***************************************************************************************
; Model  : fixedpoint.h
; Description : Normal fixed point calculation.
; Author  : Ma Hai Jun
; Create Time : 2009-01-01
;*****************************************************************************************/
#ifndef  _FIXEDPOINT_H
#define  _FIXEDPOINT_H
extern unsigned int  FPM0808U(unsigned char i,unsigned char j);  //Byte * Byte
extern signed int  FPM0808S(signed char i,signed char j);
extern unsigned long  FPM1608U(unsigned short i,unsigned char j);  //Word * Byte
extern signed long FPM1608S(signed short i,signed char j);
extern unsigned long FPM1616U(unsigned short i,unsigned short j);  //Word * Word
extern signed long FPM1616S(signed short i,signed short j);
extern unsigned char FPD0808U(unsigned char i,unsigned char j);  //Byte / Byte
extern signed char FPD0808S(signed char i,signed char j);   
extern unsigned short FPD1608U(unsigned short i,unsigned char j);  //Word / Byte
extern signed short FPD1608S(signed short i,signed char j);
extern unsigned short FPD1616U(unsigned short i,unsigned short j);  //Word / Word
extern signed short FPD1616S(signed short i,signed short j);
extern unsigned long FPD3208U(unsigned long i,unsigned char j);  //DWord / Byte
extern signed long FPD3208S(signed long i,signed char j);
extern unsigned long FPD3216U(unsigned long i,unsigned int j);  //DWord / Word
extern signed long FPD3216S(signed long i,signed int j);
extern unsigned long FPD3232U(unsigned long i,unsigned long j);  //DWord / Dword
extern signed long FPD3232S(signed long i,signed long j);

extern unsigned char BCD8toHEX(unsigned char BCD);    //BCD 00--99 ==> HEX 0x00--0x63.
extern  unsigned int  BCD16toHEX(unsigned int BCD);    //BCD 00--9999==>HEX 0x00--0x270F
extern unsigned long BCD32toHEX(unsigned long BCD);    //BCD 00--99999999==>HEX 0x00--0x5F5E0FF

extern unsigned int  HEX8toBCD(unsigned char HEX);    //HEX 0x00--0xff==>BCD 00--255
extern unsigned long HEX16toBCD(unsigned int HEX);    //HEX 0x00--0xffff==>BCD 00--65535
extern unsigned long HEX32toBCD(unsigned long HEX);    //HEX 0x00--0x5f5e0ff==>BCD 00--99999999
extern void BCDDec(unsigned char xdata *ArrayPtr,unsigned char ArrayLength); //BCD++
extern void BCDInc(unsigned char xdata *ArrayPtr,unsigned char ArrayLength); //BCD--
extern char xdata *memcpy_xdata(char xdata *source,char xdata *dest,unsigned char i); // copy source to dest,return dest address.
extern char data  *memcpy_data(char data *source,char data *dest,unsigned char i); // copy source to dest,return dest address.
extern  unsigned char getstrlen_data(char data *string);
extern unsigned char getstrlen_xdata(char xdata *string);
extern char data *memcpyfrom_ndata(char data *source,char data *dest,unsigned char from,unsigned char n); /*眖From竚秨﹍狡籹source计舱いn计沮destい*/
extern char xdata *memcpyfrom_nxdata(char xdata *source,char xdata *dest,unsigned char from,unsigned char n);
extern char data *memcpyfrom_tondata(char data *source,char data *dest,unsigned char sourcefrom,unsigned char destfrom,unsigned char n);
extern char xdata *memcpyfrom_tonxdata(char xdata *source,char xdata *dest,unsigned char sourcefrom,unsigned char destfrom,unsigned char n);
#endif
沙发
gongche| | 2010-6-21 21:56 | 只看该作者
看着头晕,呵呵

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

46

主题

203

帖子

0

粉丝