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

📄 configsmpsadctrigsource1.c

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

#include "smpsadc.h"
#ifdef _ADCP1IF


/*************************************************************************
* Function Name     : ConfigSmpsADCTrigSource1
* Description       : This function configures the ADC trigger source 
*                     for channels AN3 and AN2                     
* Parameters        : unsigned int config1
* Return Value      : None 
**************************************************************************/

void ConfigSmpsADCTrigSource1(unsigned int config1)

 {
   	/* Enable/Disable the ADC Interrupt request for Analog ch AN3 and AN2 */
	
     ADCPC0bits.IRQEN1   = ((config1 & 0x8000) >> 15);

/* Enables to select the Trigger source for conversion of Analog ch AN3 and AN2 */

     ADCPC0bits.TRGSRC1  = ((config1 & 0x1F00) >> 12); 

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

⌨️ 快捷键说明

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