Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
8400351d
Commit
8400351d
authored
8 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
stmhal: Use MICROPY_EVENT_POLL_HOOK instead of __WFI where appropriate.
parent
dee47949
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
stmhal/mphalport.c
+1
-1
1 addition, 1 deletion
stmhal/mphalport.c
stmhal/uart.c
+2
-2
2 additions, 2 deletions
stmhal/uart.c
with
3 additions
and
3 deletions
stmhal/mphalport.c
+
1
−
1
View file @
8400351d
...
@@ -43,7 +43,7 @@ int mp_hal_stdin_rx_chr(void) {
...
@@ -43,7 +43,7 @@ int mp_hal_stdin_rx_chr(void) {
}
else
if
(
MP_STATE_PORT
(
pyb_stdio_uart
)
!=
NULL
&&
uart_rx_any
(
MP_STATE_PORT
(
pyb_stdio_uart
)))
{
}
else
if
(
MP_STATE_PORT
(
pyb_stdio_uart
)
!=
NULL
&&
uart_rx_any
(
MP_STATE_PORT
(
pyb_stdio_uart
)))
{
return
uart_rx_char
(
MP_STATE_PORT
(
pyb_stdio_uart
));
return
uart_rx_char
(
MP_STATE_PORT
(
pyb_stdio_uart
));
}
}
__WFI
();
MICROPY_EVENT_POLL_HOOK
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
stmhal/uart.c
+
2
−
2
View file @
8400351d
...
@@ -334,7 +334,7 @@ STATIC bool uart_rx_wait(pyb_uart_obj_t *self, uint32_t timeout) {
...
@@ -334,7 +334,7 @@ STATIC bool uart_rx_wait(pyb_uart_obj_t *self, uint32_t timeout) {
if
(
HAL_GetTick
()
-
start
>=
timeout
)
{
if
(
HAL_GetTick
()
-
start
>=
timeout
)
{
return
false
;
// timeout
return
false
;
// timeout
}
}
__WFI
();
MICROPY_EVENT_POLL_HOOK
}
}
}
}
...
@@ -375,7 +375,7 @@ STATIC bool uart_tx_wait(pyb_uart_obj_t *self, uint32_t timeout) {
...
@@ -375,7 +375,7 @@ STATIC bool uart_tx_wait(pyb_uart_obj_t *self, uint32_t timeout) {
if
(
HAL_GetTick
()
-
start
>=
timeout
)
{
if
(
HAL_GetTick
()
-
start
>=
timeout
)
{
return
false
;
// timeout
return
false
;
// timeout
}
}
__WFI
();
MICROPY_EVENT_POLL_HOOK
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment