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
c961889e
Commit
c961889e
authored
9 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
esp8266: Add basic support for duplicating REPL output.
parent
6ca17c19
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
esp8266/esp_mphal.c
+10
-4
10 additions, 4 deletions
esp8266/esp_mphal.c
esp8266/mpconfigport.h
+1
-0
1 addition, 0 deletions
esp8266/mpconfigport.h
with
11 additions
and
4 deletions
esp8266/esp_mphal.c
+
10
−
4
View file @
c961889e
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include
"ets_alt_task.h"
#include
"ets_alt_task.h"
#include
"py/obj.h"
#include
"py/obj.h"
#include
"py/mpstate.h"
#include
"py/mpstate.h"
#include
"extmod/misc.h"
extern
void
ets_wdt_disable
(
void
);
extern
void
ets_wdt_disable
(
void
);
extern
void
wdt_feed
(
void
);
extern
void
wdt_feed
(
void
);
...
@@ -68,24 +69,29 @@ int mp_hal_stdin_rx_chr(void) {
...
@@ -68,24 +69,29 @@ int mp_hal_stdin_rx_chr(void) {
}
}
}
}
void
mp_hal_stdout_tx_char
(
char
c
)
{
uart_tx_one_char
(
UART0
,
c
);
mp_uos_dupterm_tx_strn
(
&
c
,
1
);
}
void
mp_hal_stdout_tx_str
(
const
char
*
str
)
{
void
mp_hal_stdout_tx_str
(
const
char
*
str
)
{
while
(
*
str
)
{
while
(
*
str
)
{
uar
t_tx_
one_
char
(
UART0
,
*
str
++
);
mp_hal_stdou
t_tx_char
(
*
str
++
);
}
}
}
}
void
mp_hal_stdout_tx_strn
(
const
char
*
str
,
uint32_t
len
)
{
void
mp_hal_stdout_tx_strn
(
const
char
*
str
,
uint32_t
len
)
{
while
(
len
--
)
{
while
(
len
--
)
{
uar
t_tx_
one_
char
(
UART0
,
*
str
++
);
mp_hal_stdou
t_tx_char
(
*
str
++
);
}
}
}
}
void
mp_hal_stdout_tx_strn_cooked
(
const
char
*
str
,
uint32_t
len
)
{
void
mp_hal_stdout_tx_strn_cooked
(
const
char
*
str
,
uint32_t
len
)
{
while
(
len
--
)
{
while
(
len
--
)
{
if
(
*
str
==
'\n'
)
{
if
(
*
str
==
'\n'
)
{
uar
t_tx_
one_
char
(
UART0
,
'\r'
);
mp_hal_stdou
t_tx_char
(
'\r'
);
}
}
uar
t_tx_
one_
char
(
UART0
,
*
str
++
);
mp_hal_stdou
t_tx_char
(
*
str
++
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
esp8266/mpconfigport.h
+
1
−
0
View file @
c961889e
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
#define MICROPY_PY_LWIP (1)
#define MICROPY_PY_LWIP (1)
#define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_PY_OS_DUPTERM (1)
#define MICROPY_CPYTHON_COMPAT (1)
#define MICROPY_CPYTHON_COMPAT (1)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
...
...
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