crazyflie-firmware/src/lib/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c
/**
  * @brief  Checks whether the specified TIM flag is set or not.
  * @param  TIMx: where x can be 1 to 8 to select the TIM peripheral.
  * @param  TIM_FLAG: specifies the flag to check.
  *   This parameter can be one of the following values:
  *     @arg TIM_FLAG_Update: TIM update Flag
  *     @arg TIM_FLAG_CC1: TIM Capture Compare 1 Flag
  *     @arg TIM_FLAG_CC2: TIM Capture Compare 2 Flag
  *     @arg TIM_FLAG_CC3: TIM Capture Compare 3 Flag
  *     @arg TIM_FLAG_CC4: TIM Capture Compare 4 Flag
  *     @arg TIM_FLAG_COM: TIM Commutation Flag
  *     @arg TIM_FLAG_Trigger: TIM Trigger Flag
  *     @arg TIM_FLAG_Break: TIM Break Flag
  *     @arg TIM_FLAG_CC1OF: TIM Capture Compare 1 overcapture Flag
  *     @arg TIM_FLAG_CC2OF: TIM Capture Compare 2 overcapture Flag
  *     @arg TIM_FLAG_CC3OF: TIM Capture Compare 3 overcapture Flag
  *     @arg TIM_FLAG_CC4OF: TIM Capture Compare 4 overcapture Flag
  * @note
  *   - TIM6 and TIM7 can have only one update flag. 
  *   - TIM_FLAG_COM and TIM_FLAG_Break are used only with TIM1 and TIM8.    
  * @retval The new state of TIM_FLAG (SET or RESET).
  */
@brief  Checks whether the specified TIM flag is set or not.
@param  TIMx: where x can be 1 to 8 to select the TIM peripheral.
@param  TIM_FLAG: specifies the flag to check.
@brief Checks whether the specified TIM flag is set or not . @param TIMx : where x can be 1 to 8 to select the TIM peripheral . @param TIM_FLAG : specifies the flag to check .
FlagStatus TIM_GetFlagStatus(TIM_TypeDef* TIMx, uint16_t TIM_FLAG)
{ 
  ITStatus bitstatus = RESET;  
  assert_param(IS_TIM_ALL_PERIPH(TIMx));
  assert_param(IS_TIM_GET_FLAG(TIM_FLAG));
  if ((TIMx->SR & TIM_FLAG) != (uint16_t)RESET)
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }
  return bitstatus;
}
FlagStatus TIM_GetFlagStatus ( TIM_TypeDef * TIMx , uint16_t TIM_FLAG ) { ITStatus bitstatus = RESET ; assert_param ( IS_TIM_ALL_PERIPH ( TIMx ) ) ; assert_param ( IS_TIM_GET_FLAG ( TIM_FLAG ) ) ; if ( ( TIMx -> SR & TIM_FLAG ) != ( uint16_t ) RESET ) { bitstatus = SET ; } else { bitstatus = RESET ; } return bitstatus ; }
@brief  Checks whether the specified TIM flag is set or not.
@brief Checks whether the specified TIM flag is set or not .
/* Check the parameters */