📄 viic.h
字号:
/**********************************************************************************************
***模块名称: VIIC.C ***
***模块功能: 使用端口模拟IIC总线时序的IIC总线驱动包 ***
***作 者: METAL MAX,liyangbbs@126.com ***
***调用方式: ***
***日 志: 日期 版本 修改人 事件 ***
*** 2008/5/27 V0.01 METAL MAX 更新 ***
***备 注: ***
**********************************************************************************************/
#ifndef _VIIC_H_
#define _VIIC_H_
/****************************************************************************************************************************
**函数名称: void IICStart() **
**函数功能: 起动总线函数 **
**入口参数: **
**出口参数: **
**具体资源: **
**调用程序: **
**备 注: **
****************************************************************************************************************************/
void IICStart(void);
/****************************************************************************************************************************
**函数名称: void IICStop() **
**函数功能: 结束总线函数 **
**入口参数: **
**出口参数: **
**具体资源: **
**调用程序: **
**备 注: **
****************************************************************************************************************************/
void IICStop(void);
/*****************************************************************************************************************************
**函数名称: void SendByte(unsigned char dat) **
**函数功能: 字节数据传送函数 **
**入口参数: **
**出口参数: **
**具体资源: **
**调用程序: **
**备 注: **
*****************************************************************************************************************************/
void SendByte(unsigned char dat);
/****************************************************************************************************************************
**函数名称: unsigned char RcvByte() **
**函数功能: 字节数据传送函数 **
**入口参数: **
**出口参数: **
**具体资源: **
**调用程序: **
**备 注: **
****************************************************************************************************************************/
unsigned char RcvByte(void);
/****************************************************************************************************************************
**函数名称: ACK(bit a) **
**函数功能: 应答子函数 **
**入口参数: **
**出口参数: **
**具体资源: **
**调用程序: **
**备 注: **
****************************************************************************************************************************/
void IICACK(bit ack);
/****************************************************************************************************************************
**函数名称: bit ISendByte(unsigned char slave,ucahr dat) **
**函数功能: 向无子地址器件发送字节数据函数 **
**入口参数: **
**出口参数: **
**具体资源: **
**调用程序: **
**备 注: **
****************************************************************************************************************************/
bit ISendByte(unsigned char slave, unsigned char dat);
/****************************************************************************************************************************
**函数名称: bit ISendStr(unsigned char slave, unsigned char subaddr, unsigned char *p, unsigned char num) **
**函数功能: 向有子地址器件发送多字节数据函数 **
**入口参数: **
**出口参数: **
**具体资源: **
**调用程序: **
**备 注: **
****************************************************************************************************************************/
bit ISendStr(unsigned char slave, unsigned char subaddr, unsigned char *p, unsigned char num);
/****************************************************************************************************************************
**函数名称: bit IRcvByte(unsigned char slave,ucahr *dat) **
**函数功能: 向无子地址器件读字节数据函数 **
**入口参数: **
**出口参数: **
**具体资源: **
**调用程序: **
**备 注: **
****************************************************************************************************************************/
bit IRcvByte(unsigned char slave, unsigned char *dat);
/****************************************************************************************************************************
**函数名称: bit ISendStr(unsigned char slave, unsigned char subaddr, ucahr *p, unsigned char num) **
**函数功能: 向有子地址器件读取多字节数据函数 **
**入口参数: **
**出口参数: **
**具体资源: **
**调用程序: **
**备 注: **
****************************************************************************************************************************/
bit IRcvStr(unsigned char slave, unsigned char subaddr, unsigned char *p, unsigned char num);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -