Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
d24f2ae4
Commit
d24f2ae4
authored
Aug 30, 2022
by
Joo Aun Saw
Committed by
Johny Mattsson
Aug 30, 2022
Browse files
platform uart: really feed uart data to both console and on-data cb
parent
0e71189c
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/platform/platform.c
View file @
d24f2ae4
...
@@ -75,14 +75,18 @@ void uart_event_task( task_param_t param, task_prio_t prio ) {
...
@@ -75,14 +75,18 @@ void uart_event_task( task_param_t param, task_prio_t prio ) {
uart_status_t
*
us
=
&
uart_status
[
id
];
uart_status_t
*
us
=
&
uart_status
[
id
];
xSemaphoreGive
(
sem
);
xSemaphoreGive
(
sem
);
if
(
post
->
type
==
PLATFORM_UART_EVENT_DATA
)
{
if
(
post
->
type
==
PLATFORM_UART_EVENT_DATA
)
{
size_t
i
=
0
;
if
(
id
==
CONFIG_ESP_CONSOLE_UART_NUM
&&
run_input
)
{
while
(
i
<
post
->
size
)
size_t
i
=
0
;
{
while
(
i
<
post
->
size
)
if
(
id
==
CONFIG_ESP_CONSOLE_UART_NUM
&&
run_input
)
{
{
unsigned
used
=
feed_lua_input
(
post
->
data
+
i
,
post
->
size
-
i
);
unsigned
used
=
feed_lua_input
(
post
->
data
+
i
,
post
->
size
-
i
);
i
+=
used
;
i
+=
used
;
}
}
if
(
uart_has_on_data_cb
(
id
))
{
}
if
(
uart_has_on_data_cb
(
id
))
{
size_t
i
=
0
;
while
(
i
<
post
->
size
)
{
char
ch
=
post
->
data
[
i
];
char
ch
=
post
->
data
[
i
];
us
->
line_buffer
[
us
->
line_position
]
=
ch
;
us
->
line_buffer
[
us
->
line_position
]
=
ch
;
us
->
line_position
++
;
us
->
line_position
++
;
...
...
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