[BLUEPILL_F103C8] Sleep code refactor

pull/2221/head
Jarek Zgoda 2016-07-22 15:10:13 +02:00
parent 6b8ff8feb3
commit 8c785e5022
1 changed files with 15 additions and 0 deletions

View File

@ -138,6 +138,21 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) {
return HAL_OK;
}
void HAL_SuspendTick(void)
{
TimMasterHandle.Instance = TIM_MST;
// Disable HAL tick and us_ticker update interrupts (used for 32 bit counter)
__HAL_TIM_DISABLE_IT(&TimMasterHandle, (TIM_IT_CC2 | TIM_IT_UPDATE));
}
void HAL_ResumeTick(void)
{
TimMasterHandle.Instance = TIM_MST;
// Enable HAL tick and us_ticker update interrupts (used for 32 bit counter)
__HAL_TIM_ENABLE_IT(&TimMasterHandle, (TIM_IT_CC2 | TIM_IT_UPDATE));
}
/**
* @}
*/