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

📄 slavereadi2c2.c

📁 Mplab C30编译器
💻 C
字号:
/**********************************************************************
*    Function Name:  SlaveReadI2C2
*    Description:    This routine reads a single byte from the I2C Bus. 
*                    The RBF bit is checked until it is set.When set,
*                    the receive register is full and it's contents are
*                    returned.					 
*    Parameters:     void
*    Return Value:   unsigned char
***********************************************************************/

#include "i2c.h"

#if defined(_MI2C2IF)

unsigned char SlaveReadI2C2(void)
{
     while(!I2C2STATbits.RBF);
     I2C2STATbits.I2COV = 0;
     return(I2C2RCV);
}

#else
#warning "Does not build on this target"
#endif


⌨️ 快捷键说明

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