closei2c2.c
来自「基於 c51/8051 的 nand Flash Memory HY27US08」· C语言 代码 · 共 34 行
C
34 行
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include <i2c.h>
/*********************************************************************
* Function Name: CloseI2C2
* Description: This routine disables the I2C2 module by
* clearing the I2CEN bit in I2C2CON register.
* The MI2C2 and SI2C2 interrupts are disabled and
* the corresponding IF flags are cleared
* Parameters: void
* Return Value: void
*********************************************************************/
#ifdef _I2C_V2_2
void CloseI2C2(void)
{
/* clear the I2CEN bit */
I2C2CONbits.I2CEN = 0;
/* clear the SI2C2 & MI2C2 Interrupt enable bits */
IEC3bits.SI2C2IE = 0;
IEC3bits.MI2C2IE = 0;
/* clear the SI2C2 & MI2C2 Interrupt flag bits */
IFS3bits.SI2C2IF = 0;
IFS3bits.MI2C2IF = 0;
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?