在线时间7 小时
UID3061349
ST金币0
蝴蝶豆0
注册时间2016-3-15
初级会员
- 最后登录
- 2020-1-24
|
发表于 2016-9-19 11:18:42
|
显示全部楼层
a0a.1 0b0c
咱们有个问题讨论下,你看KEIL5,/**
* @brief Enables or disables the TIM peripheral Main Outputs.
* @param TIMx: where x can be 1, 15, 16 or 17 to select the TIMx peripheral.
* @param NewState: new state of the TIM peripheral Main Outputs.
* This parameter can be: ENABLE or DISABLE.
* @retval None
*/
void TIM_CtrlPWMOutputs(TIM_TypeDef* TIMx, FunctionalState NewState)
{
/* Check the parameters */
assert_param(IS_TIM_LIST2_PERIPH(TIMx));
assert_param(IS_FUNCTIONAL_STATE(NewState));
if (NewState != DISABLE)
{
/* Enable the TIM Main Output */
TIMx->BDTR |= TIM_BDTR_MOE;
}
else
{
/* Disable the TIM Main Output */
TIMx->BDTR &= (uint16_t)(~((uint16_t)TIM_BDTR_MOE));
}
}
TIM3属于高级定时器吗?貌似只有高级定时器才有这句吧? |
|