📄 setdutycyclemcpwm2.c
字号:
#include <pwm12.h>
#ifdef _FLTA2IF
/*********************************************************************
* Function Name : SetDCMCPWM2
* Description : This function updates the dutycycle register and
* updatedisable bit.
* Parameters : unsigned int dutycycle
* char updatedisable
* Return Value : None
**********************************************************************/
void SetDCMCPWM2(unsigned int dutycycle,
char updatedisable)
{
PWM2CON2bits.UDIS = updatedisable & 0x1;
/* Assign dutycycle to the duty cycle register */
*(&P2DC1) = dutycycle;
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -