mirror of https://github.com/ARMmbed/mbed-os.git
[BLUEPILL_F103C8] Sleep code refactor
parent
6b8ff8feb3
commit
8c785e5022
|
@ -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));
|
||||
}
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue