/******************************************************************************* * 函数名称: PWR_ClearFlag * 功能描述: 清空PWR挂起标志位。 * 输入参数: PWR_FLAG:要清空的标志。 * 这个参数可以是下面的值之一: * - PWR_FLAG_WU: Wake Up 标志 * - PWR_FLAG_SB: StandBy 标志 * 输出参数: 无 * 返回参数: 无 *******************************************************************************/ void PWR_ClearFlag(u32 PWR_FLAG) { /* Check the parameters [检查参数]*/ assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG)); PWR->CR |= PWR_FLAG << 2; }
/** * @brief Clears the PWR's pending flags. * @param PWR_FLAG: specifies the flag to clear. * This parameter can be one of the following values: * @arg PWR_FLAG_WU: Wake Up flag * @arg PWR_FLAG_SB: StandBy flag * @retval None */ void PWR_ClearFlag(uint32_t PWR_FLAG) { /* Check the parameters */ assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG)); PWR->CR |= PWR_FLAG << 2; }
/** * @brief Clears the PWR's pending flags. * @param PWR_FLAG: specifies the flag to clear. * This parameter can be one of the following values: * @arg PWR_FLAG_WU: Wake Up flag * @arg PWR_FLAG_SB: StandBy flag * @arg PWR_FLAG_UDRDY: Under-drive ready flag (STM32F42xxx/43xxx devices) * @retval None */ void PWR_ClearFlag(uint32_t PWR_FLAG) { /* Check the parameters */ assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG)); #if defined (STM32F427_437xx) || defined (STM32F429_439xx) if (PWR_FLAG != PWR_FLAG_UDRDY) { PWR->CR |= PWR_FLAG << 2; } else { PWR->CSR |= PWR_FLAG_UDRDY; } #endif /* STM32F427_437xx || STM32F429_439xx */ #if defined (STM32F40_41xxx) || defined (STM32F401xx) || defined (STM32F410xx) || defined (STM32F411xE) || defined(STM32F412xG) PWR->CR |= PWR_FLAG << 2; #endif /* STM32F40_41xxx || STM32F401xx || STM32F410xx || STM32F411xE || STM32F412xG */ }
/** * @brief Clears the PWR's pending flags. * @param PWR_FLAG: specifies the flag to clear. * This parameter can be one of the following values: * @arg PWR_FLAG_WU: Wake Up flag * @arg PWR_FLAG_SB: StandBy flag * @arg PWR_FLAG_UDRDY: Under-drive ready flag (STM32F42xxx/43xxx devices) * @retval None */ void PWR_ClearFlag(uint32_t PWR_FLAG) { /* Check the parameters */ assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG)); #if defined (STM32F42_43xxx) if (PWR_FLAG != PWR_FLAG_UDRDY) { PWR->CR |= PWR_FLAG << 2; } else { PWR->CSR |= PWR_FLAG_UDRDY; } #endif /* STM32F42_43xxx */ #if defined (STM32F40_41xxx) PWR->CR |= PWR_FLAG << 2; #endif /* STM32F40_41xxx */ }
/** * @brief Clears the PWR's pending flags. * @param PWR_FLAG: specifies the flag to clear. * This parameter can be one of the following values: * @arg PWR_FLAG_WU: Wake Up flag * @arg PWR_FLAG_SB: StandBy flag * @retval None */ void PWR_ClearFlag(uint32_t PWR_FLAG) { #ifdef OS_UCOS OS_CPU_SR cpu_sr; #endif #ifdef OS_UCOS OS_ENTER_CRITICAL(); #endif /* Check the parameters */ assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG)); PWR->CR |= PWR_FLAG << 2; #ifdef OS_UCOS OS_EXIT_CRITICAL(); #endif }