slavewritei2c1.c
来自「基於 c51/8051 的 nand Flash Memory HY27US08」· C语言 代码 · 共 29 行
C
29 行
#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_1
void SlaveWriteI2C1(unsigned char data_out)
{
I2C1TRN = data_out; /* data transferred to I2C1TRN reg */
I2C1CONbits.SCLREL = 1; /* Release the clock */
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?