firmware-latest/platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/src/stm32f10x_tim.c
/**
  * @brief  Enables or disables the TIMx peripheral Preload register on CCR1.
  * @param  TIMx: where x can be  1 to 17 except 6 and 7 to select the TIM peripheral.
  * @param  TIM_OCPreload: new state of the TIMx peripheral Preload register
  *   This parameter can be one of the following values:
  *     @arg TIM_OCPreload_Enable
  *     @arg TIM_OCPreload_Disable
  * @retval None
  */
@brief  Enables or disables the TIMx peripheral Preload register on CCR1.
@param  TIMx: where x can be  1 to 17 except 6 and 7 to select the TIM peripheral.
@param  TIM_OCPreload: new state of the TIMx peripheral Preload register
This parameter can be one of the following values:
@arg TIM_OCPreload_Enable
@arg TIM_OCPreload_Disable
@retval None
@brief Enables or disables the TIMx peripheral Preload register on CCR1 . @param TIMx : where x can be 1 to 17 except 6 and 7 to select the TIM peripheral . @param TIM_OCPreload : new state of the TIMx peripheral Preload register This parameter can be one of the following values : @arg TIM_OCPreload_Enable @arg TIM_OCPreload_Disable @retval None
void TIM_OC1PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload)
{
  uint16_t tmpccmr1 = 0;
  assert_param(IS_TIM_LIST8_PERIPH(TIMx));
  assert_param(IS_TIM_OCPRELOAD_STATE(TIM_OCPreload));
  tmpccmr1 = TIMx->CCMR1;
  tmpccmr1 &= (uint16_t)~((uint16_t)TIM_CCMR1_OC1PE);
  tmpccmr1 |= TIM_OCPreload;
  TIMx->CCMR1 = tmpccmr1;
}
void TIM_OC1PreloadConfig ( TIM_TypeDef * TIMx , uint16_t TIM_OCPreload ) { uint16_t tmpccmr1 = 0 ; assert_param ( IS_TIM_LIST8_PERIPH ( TIMx ) ) ; assert_param ( IS_TIM_OCPRELOAD_STATE ( TIM_OCPreload ) ) ; tmpccmr1 = TIMx -> CCMR1 ; tmpccmr1 &= ( uint16_t ) ~ ( ( uint16_t ) TIM_CCMR1_OC1PE ) ; tmpccmr1 |= TIM_OCPreload ; TIMx -> CCMR1 = tmpccmr1 ; }
@brief  Enables or disables the TIMx peripheral Preload register on CCR1.
@brief Enables or disables the TIMx peripheral Preload register on CCR1 .
/* Check the parameters */ /* Reset the OC1PE Bit */ /* Enable or Disable the Output Compare Preload feature */ /* Write to TIMx CCMR1 register */