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
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
6a051a8e
Commit
6a051a8e
authored
9 years ago
by
Damien George
Committed by
Paul Sokolovsky
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
esp8266/uart: Get ctrl-C working now that event-based REPL is disabled.
parent
fb6cc969
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
esp8266/uart.c
+10
-5
10 additions, 5 deletions
esp8266/uart.c
with
10 additions
and
5 deletions
esp8266/uart.c
+
10
−
5
View file @
6a051a8e
...
...
@@ -38,6 +38,11 @@ static os_event_t uart_evt_queue[16];
static
void
uart0_rx_intr_handler
(
void
*
para
);
void
soft_reset
(
void
);
void
mp_keyboard_interrupt
(
void
);
int
interrupt_char
;
/******************************************************************************
* FunctionName : uart_config
* Description : Internal used function
...
...
@@ -168,8 +173,12 @@ static void uart0_rx_intr_handler(void *para) {
while
(
READ_PERI_REG
(
UART_STATUS
(
uart_no
))
&
(
UART_RXFIFO_CNT
<<
UART_RXFIFO_CNT_S
))
{
uint8
RcvChar
=
READ_PERI_REG
(
UART_FIFO
(
uart_no
))
&
0xff
;
if
(
RcvChar
==
interrupt_char
)
{
mp_keyboard_interrupt
();
}
else
{
ringbuf_put
(
&
input_buf
,
RcvChar
);
}
}
mp_hal_signal_input
();
...
...
@@ -237,10 +246,6 @@ void ICACHE_FLASH_ATTR uart_reattach() {
#include
"py/obj.h"
#include
"lib/utils/pyexec.h"
void
soft_reset
(
void
);
void
mp_keyboard_interrupt
(
void
);
int
interrupt_char
;
#if MICROPY_REPL_EVENT_DRIVEN
void
uart_task_handler
(
os_event_t
*
evt
)
{
if
(
pyexec_repl_active
)
{
...
...
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