📄 configint1.c
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -