slavewritei2c2.c
来自「基於 c51/8051 的 nand Flash Memory HY27US08」· C语言 代码 · 共 31 行
C
31 行
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include <i2c.h>
/****************************************************************************
* Function Name: SlaveWriteI2C
* Description: This routine is used to write a byte to the I2C bus.
* The input parameter data_out is written to the
* I2CTRN register.
* Parameters: unsigned char : data_out
* Return Value: None
******************************************************************************/
#ifdef _I2C_V2_2
void SlaveWriteI2C2(unsigned char data_out)
{
I2C2TRN = data_out; /* data transferred to I2C2TRN reg */
I2C2CONbits.SCLREL = 1; /* Release the clock */
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?