FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/ST_Code/Libraries/STM32L1xx_StdPeriph_Driver/src/stm32l1xx_tim.c
/**
  * @brief  Enables or disables the TIMx peripheral Preload register on CCR3.
  * @param  TIMx: where x can be 2, 3, 4 or 5 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: Enable TIM output compare Preload
  *     @arg TIM_OCPreload_Disable: Disable TIM output compare Preload
  * @retval None
  */
@brief  Enables or disables the TIMx peripheral Preload register on CCR3.
@param  TIMx: where x can be 2, 3, 4 or 5 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: Enable TIM output compare Preload
@arg TIM_OCPreload_Disable: Disable TIM output compare Preload
@retval None
@brief Enables or disables the TIMx peripheral Preload register on CCR3 . @param TIMx : where x can be 2 3 4 or 5 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 : Enable TIM output compare Preload @arg TIM_OCPreload_Disable : Disable TIM output compare Preload @retval None
void TIM_OC3PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload)
{
  uint16_t tmpccmr2 = 0;
  assert_param(IS_TIM_LIST3_PERIPH(TIMx));
  assert_param(IS_TIM_OCPRELOAD_STATE(TIM_OCPreload));
  tmpccmr2 = TIMx->CCMR2;
  tmpccmr2 &= (uint16_t)~((uint16_t)TIM_CCMR2_OC3PE);
  tmpccmr2 |= TIM_OCPreload;
  TIMx->CCMR2 = tmpccmr2;
}
void TIM_OC3PreloadConfig ( TIM_TypeDef * TIMx , uint16_t TIM_OCPreload ) { uint16_t tmpccmr2 = 0 ; assert_param ( IS_TIM_LIST3_PERIPH ( TIMx ) ) ; assert_param ( IS_TIM_OCPRELOAD_STATE ( TIM_OCPreload ) ) ; tmpccmr2 = TIMx -> CCMR2 ; tmpccmr2 &= ( uint16_t ) ~ ( ( uint16_t ) TIM_CCMR2_OC3PE ) ; tmpccmr2 |= TIM_OCPreload ; TIMx -> CCMR2 = tmpccmr2 ; }
@brief  Enables or disables the TIMx peripheral Preload register on CCR3.
@brief Enables or disables the TIMx peripheral Preload register on CCR3 .
/* Check the parameters */ /* Reset the OC3PE Bit */ /* Enable or Disable the Output Compare Preload feature */ /* Write to TIMx CCMR2 register */