slavewritei2c.c
来自「Microchip的官方PIC24H系列16位单片机的外设源程序库。」· C语言 代码 · 共 18 行
C
18 行
#include <i2c.h>
#include <p30fxxxx.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
******************************************************************************/
void SlaveWriteI2C(unsigned char data_out)
{
I2CTRN = data_out; /* data transferred to I2CTRN reg */
I2CCONbits.SCLREL = 1; /* Release the clock */
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?