libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/stm32f10x_tim.c
/**
  * @brief  Sets or Resets the TIM peripheral Capture Compare Preload Control bit.
  * @param  TIMx: where x can be   1, 2, 3, 4, 5, 8 or 15 
  *         to select the TIMx peripheral
  * @param  NewState: new state of the Capture Compare Preload Control bit
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
@brief  Sets or Resets the TIM peripheral Capture Compare Preload Control bit.
@param  TIMx: where x can be   1, 2, 3, 4, 5, 8 or 15
to select the TIMx peripheral
@param  NewState: new state of the Capture Compare Preload Control bit
This parameter can be: ENABLE or DISABLE.
@retval None
@brief Sets or Resets the TIM peripheral Capture Compare Preload Control bit . @param TIMx : where x can be 1 2 3 4 5 8 or 15 to select the TIMx peripheral @param NewState : new state of the Capture Compare Preload Control bit This parameter can be : ENABLE or DISABLE . @retval None
void TIM_CCPreloadControl(TIM_TypeDef* TIMx, FunctionalState NewState)
{ 
  assert_param(IS_TIM_LIST5_PERIPH(TIMx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    TIMx->CR2 |= TIM_CR2_CCPC;
  }
  else
  {
    TIMx->CR2 &= (uint16_t)~((uint16_t)TIM_CR2_CCPC);
  }
}
void TIM_CCPreloadControl ( TIM_TypeDef * TIMx , FunctionalState NewState ) { assert_param ( IS_TIM_LIST5_PERIPH ( TIMx ) ) ; assert_param ( IS_FUNCTIONAL_STATE ( NewState ) ) ; if ( NewState != DISABLE ) { TIMx -> CR2 |= TIM_CR2_CCPC ; } else { TIMx -> CR2 &= ( uint16_t ) ~ ( ( uint16_t ) TIM_CR2_CCPC ) ; } }
@brief  Sets or Resets the TIM peripheral Capture Compare Preload Control bit.
@brief Sets or Resets the TIM peripheral Capture Compare Preload Control bit .
/* Check the parameters */ /* Set the CCPC Bit */ /* Reset the CCPC Bit */