📄 slavereadi2c2.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 + -