Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython-simulator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython-simulator
Commits
6e6d5963
Commit
6e6d5963
authored
Aug 21, 2019
by
George Wort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that mp_hal_delay does wait at least once per call.
parent
f08164aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
source/microbit/mphalport.cpp
source/microbit/mphalport.cpp
+2
-0
No files found.
source/microbit/mphalport.cpp
View file @
6e6d5963
...
...
@@ -123,6 +123,7 @@ void mp_hal_display_string(const char *str) {
}
void
mp_hal_delay_us
(
mp_uint_t
us
)
{
wait_us
(
1
);
mp_uint_t
start
=
mp_hal_ticks_us
();
while
(
mp_hal_ticks_us
()
-
start
<
us
)
{
wait_us
(
1
);
...
...
@@ -130,6 +131,7 @@ void mp_hal_delay_us(mp_uint_t us) {
}
void
mp_hal_delay_ms
(
mp_uint_t
ms
)
{
wait_ms
(
1
);
mp_uint_t
start
=
mp_hal_ticks_ms
();
while
(
mp_hal_ticks_ms
()
-
start
<
ms
)
{
wait_ms
(
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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