configsmpsadctrigsource2.c

来自「Mplab C30编译器」· C语言 代码 · 共 36 行

C
36
字号
#if defined(__dsPIC30F__) 
#include <p30fxxxx.h>
#elif defined(__dsPIC33F__)
#include <p33Fxxxx.h>
#endif

#include "smpsadc.h"
#ifdef _ADCP2IF


/*************************************************************************
* Function Name     : ConfigSmpsADCTrigSource2
* Description       : This function configures the ADC trigger source 
*                     for channels AN5 and AN4                     
* Parameters        : unsigned int config1
* Return Value      : None 
**************************************************************************/

void ConfigSmpsADCTrigSource2(unsigned int config1)

 {
   	/* Enable/Disable the ADC Interrupt request for Analog ch AN5 and AN4 */
	
     ADCPC1bits.IRQEN2   = ((config1 & 0x0080) >> 7);

/* Enables to select the Trigger source for conversion of Analog ch AN5 and AN4 */

     ADCPC1bits.TRGSRC2  = (config1 & 0x001F); 

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

⌨️ 快捷键说明

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