⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configintsmpsadcpair2.c

📁 Mplab C30编译器
💻 C
字号:
#if defined(__dsPIC30F__) 
#include <p30fxxxx.h>
#elif defined(__dsPIC33F__)
#include <p33Fxxxx.h>
#endif

#include "smpsadc.h"
#ifdef _ADCP2IF 


/*************************************************************************
* Function Name     : ConfigIntSmpsADCPair2
* Description       : This function clears the Interrupt Flag bits, sets the interrupt 
*                     priorities and Enables/disables the interrupts for ADC channels AN5 and AN4                        
* Parameters        : unsigned int adc_intp, unsigned int adc_intp_priority
* Return Value      : None 
**************************************************************************/

void ConfigIntSmpsADCPair2(unsigned int adc_intp, unsigned int adc_intp_priority)
{

    /* Clear the ADC Interrupt status Flags of ADC channels AN5 and AN4 */
	IFS2bits.ADCP2IF = 0;

	/* Enable/Disable the ADC Interrupt of ADC channels AN5 and AN4 */
	IEC2bits.ADCP2IE = adc_intp;

	/* Set the priority of ADC interrupt for ADC channels AN5 and AN4 */
	IPC9bits.ADCP2IP = adc_intp_priority;
	
}

#else
#warning "Does not build on this target"
#endif
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -