这里是有2个函数,1个是2个参数的,1个是3个参数的。大兄弟我编译是可以通过的。
回到问题上来吧。
/**
* [url=home.php?mod=space&uid=247401]@brief[/url] Enable capture of selected channel(s)
* @param[in] pwm The pointer of the specified PWM module
* - PWM0 : PWM Group 0
* - PWM1 : PWM Group 1
* @param[in] u32ChannelMask Combination of enabled channels. Each bit corresponds to a channel.
* Bit 0 is channel 0, bit 1 is channel 1...
* [url=home.php?mod=space&uid=266161]@return[/url] None
* [url=home.php?mod=space&uid=1543424]@Details[/url] This function is used to enable capture of selected channel(s).
*/
void PWM_EnableCapture(PWM_T *pwm, uint32_t u32ChannelMask)
{
(pwm)->CAPINEN |= u32ChannelMask;
(pwm)->CAPCTL |= u32ChannelMask;
}
/**
* @brief Enable capture interrupt of selected channel.
* @param[in] pwm The pointer of the specified PWM module
* - PWM0 : PWM Group 0
* - PWM1 : PWM Group 1
* @param[in] u32ChannelNum PWM channel number. Valid values are between 0~5
* @param[in] u32Edge Rising or falling edge to latch counter.
* - \ref PWM_CAPTURE_INT_RISING_LATCH
* - \ref PWM_CAPTURE_INT_FALLING_LATCH
* @return None
* @details This function is used to enable capture interrupt of selected channel.
*/
void PWM_EnableCaptureInt(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Edge)
{
(pwm)->CAPIEN |= (u32Edge << u32ChannelNum);
}
|