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
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
Commits
f334816d
Commit
f334816d
authored
Dec 30, 2018
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32/uart: Make sure user IRQs are handled even with a keyboard intr.
parent
7bdbea9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
ports/stm32/uart.c
ports/stm32/uart.c
+7
-7
No files found.
ports/stm32/uart.c
View file @
f334816d
...
...
@@ -729,17 +729,17 @@ void uart_irq_handler(mp_uint_t uart_id) {
int
data
=
self
->
uartx
->
DR
;
// clears UART_FLAG_RXNE
#endif
data
&=
self
->
char_mask
;
// Handle interrupt coming in on a UART REPL
if
(
self
->
attached_to_repl
&&
data
==
mp_interrupt_char
)
{
// Handle interrupt coming in on a UART REPL
pendsv_kbd_intr
();
return
;
}
if
(
self
->
char_width
==
CHAR_WIDTH_9BIT
)
{
((
uint16_t
*
)
self
->
read_buf
)[
self
->
read_buf_head
]
=
data
;
}
else
{
self
->
read_buf
[
self
->
read_buf_head
]
=
data
;
if
(
self
->
char_width
==
CHAR_WIDTH_9BIT
)
{
((
uint16_t
*
)
self
->
read_buf
)[
self
->
read_buf_head
]
=
data
;
}
else
{
self
->
read_buf
[
self
->
read_buf_head
]
=
data
;
}
self
->
read_buf_head
=
next_head
;
}
self
->
read_buf_head
=
next_head
;
}
else
{
// No room: leave char in buf, disable interrupt
UART_RXNE_IT_DIS
(
self
->
uartx
);
}
...
...
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