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

📄 configintsmpspwmsevt.c

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

#include "smpspwm.h"
#ifdef _PSEMIF 


/*************************************************************************
* Function Name     : ConfigIntSmpsPWMSevtMatch
* Description       : This function clears the Interrupt Flag bits, sets the interrupt 
*                     priorities and Enables/disables the interrupts for Special Event match                       
* Parameters        : unsigned int pwm_intp, unsigned int pwm_intp_priority
* Return Value      : None 
**************************************************************************/

void ConfigIntSmpsPWMSevtMatch(unsigned int pwm_intp, unsigned int pwm_intp_priority)
{

    /* Clear the PWM Interrupt status Flags of Special Event match */
	IFS1bits.PSEMIF = 0;

	/* Enable/Disable the PWM Interrupt of Special Event match */
	IEC1bits.PSEMIE = pwm_intp;

	/* Set the priority of PWM interrupt for Special Event match */
	IPC4bits.PSEMIP = pwm_intp_priority;
	
}

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

⌨️ 快捷键说明

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