Skip to content

[BLUEPILL_F103C8] Sleep code refactor #2221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,19 @@ 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)
Copy link
Contributor

@0xc0170 0xc0170 Jul 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the formatting of these 2 lines? I noticed them as well in some ST code...

LGTM otherwise

__HAL_TIM_ENABLE_IT(&TimMasterHandle, (TIM_IT_CC2 | TIM_IT_UPDATE));
}
/**
* @}
*/
Expand Down