📄 configintsmpsadcpair4.c
字号:
#if defined(__dsPIC30F__)
#include <p30fxxxx.h>
#elif defined(__dsPIC33F__)
#include <p33Fxxxx.h>
#endif
#include "smpsadc.h"
#ifdef _ADCP4IF
/*************************************************************************
* Function Name : ConfigIntSmpsADCPair4
* Description : This function clears the Interrupt Flag bits, sets the interrupt
* priorities and Enables/disables the interrupts for ADC channels AN9 and AN8
* Parameters : unsigned int adc_intp, unsigned int adc_intp_priority
* Return Value : None
**************************************************************************/
void ConfigIntSmpsADCPair4(unsigned int adc_intp, unsigned int adc_intp_priority)
{
/* Clear the ADC Interrupt status Flags of ADC channels AN9 and AN8 */
IFS2bits.ADCP4IF = 0;
/* Enable/Disable the ADC Interrupt of ADC channels AN9 and AN8 */
IEC2bits.ADCP4IE = adc_intp;
/* Set the priority of ADC interrupt for ADC channels AN9 and AN8 */
IPC10bits.ADCP4IP = adc_intp_priority;
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -