STM32 16 bits ticker: don't check FLAG just clear it

Not having the check will make the code more efficient.
pull/4424/head
Laurent MEUNIER 2017-06-02 09:30:31 +02:00
parent 1b684ca4e9
commit 27be2e1884
1 changed files with 1 additions and 3 deletions

View File

@ -113,9 +113,7 @@ void us_ticker_disable_interrupt(void)
void us_ticker_clear_interrupt(void)
{
TimMasterHandle.Instance = TIM_MST;
if (__HAL_TIM_GET_FLAG(&TimMasterHandle, TIM_FLAG_CC1) == SET) {
__HAL_TIM_CLEAR_FLAG(&TimMasterHandle, TIM_FLAG_CC1);
}
__HAL_TIM_CLEAR_FLAG(&TimMasterHandle, TIM_FLAG_CC1);
}
#endif // TIM_MST_16BIT