configint1.c
来自「基於 c51/8051 的 nand Flash Memory HY27US08」· C语言 代码 · 共 30 行
C
30 行
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include<ports.h>
/********************************************************************
* Function Name : ConfigINT1
* Description : Enables external interrupt on pin INT1.
* Parameters : config determines the interrupt edge, priority
* and enable/disable information.
* Return Value : None
********************************************************************/
#ifdef _INT1
void ConfigINT1(unsigned int config)
{
IFS1bits.INT1IF = 0; /* clear the interrupt flag */
IPC5bits.INT1IP = config & 0x07; /* assign interrupt priority for 33F and 24H*/
INTCON2bits.INT1EP = (config & 0x10) >> 4; /* assign edge selected */
IEC1bits.INT1IE = (config & 0x08) >> 3; /* enable/disable interrupt */
}
/* end of function ConfigINT1 */
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?