configintsmpscmp3.c
来自「Mplab C30编译器」· C语言 代码 · 共 37 行
C
37 行
#if defined(__dsPIC30F__)
#include <p30fxxxx.h>
#elif defined(__dsPIC33F__)
#include <p33Fxxxx.h>
#endif
#include "smpscmp.h"
#ifdef _AC3IF
/*************************************************************************
* Function Name : ConfigIntSmpsCMP3
* Description : This function clears the Interrupt Flag bits, sets the interrupt
* priorities and Enables/disables the interrupts for comparator 3
* Parameters : unsigned int cmp_intp, unsigned int cmp_intp_priority
* Return Value : None
**************************************************************************/
void ConfigIntSmpsCMP3(unsigned int cmp_intp, unsigned int cmp_intp_priority)
{
/* Clear the CMP Interrupt status Flags of comparator 3 */
IFS1bits.AC3IF = 0;
/* Enable/Disable the CMP Interrupt of comparator 3 */
IEC1bits.AC3IE = cmp_intp;
/* Set the priority of CMP interrupt for comparator 3 */
IPC7bits.AC3IP = cmp_intp_priority;
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?