Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
4f7c5fa6
Commit
4f7c5fa6
authored
Sep 08, 2016
by
Krzysztof Blazewicz
Browse files
stmhal/hal: reapply HAL commit
9db719bb
for f4
parent
c79ff993
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/hal/f4/src/stm32f4xx_hal.c
View file @
4f7c5fa6
...
...
@@ -337,11 +337,14 @@ __weak uint32_t HAL_GetTick(void)
*/
__weak
void
HAL_Delay
(
__IO
uint32_t
Delay
)
{
uint32_t
tickstart
=
0U
;
tickstart
=
HAL_GetTick
();
while
((
HAL_GetTick
()
-
tickstart
)
<
Delay
)
{
}
uint32_t
start
=
HAL_GetTick
();
// Note that the following works (due to the magic of 2's complement numbers)
// even when Delay causes wraparound.
while
(
HAL_GetTick
()
-
start
<=
Delay
)
{
__WFI
();
// enter sleep mode, waiting for interrupt
}
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment