nodemcu-firmware/components/base_nodemcu
Jade Mattsson 53da95b5ae Fix uart.on('data') on console
With the switch to use the IDF's stdin for feeding the Lua VM, we
unintentionally lost the ability to use uart.on('data') on the console uart.
This is since we no longer install the nodemcu uart driver on said uart.
In order to resolve this shortcoming, this commit refactors the uart.on('data')
delimiter handling and moves it away from platform.c into uart.c where it
really belongs. A new function, uart_feed_data(), is introduced, which is used
both by the nodemcu uart driver task as well as the nodemcu console driver
task (assuming the console is in fact a uart).

The linebuffer allocation/freeing is still in response to
uart.start()/uart.stop(), but it is now in uart.c rather than
platform.c.

The whole uart integration is still too tightly coupled between the platform
component and the module component's uart.c, but this makes it slightly
better at least.
2024-05-21 16:22:51 +10:00
..
include Upgrade to IDF v5.1.2 2024-02-02 14:50:57 +11:00
CMakeLists.txt Initial support for ESP32-C6 and ESP32-H2, plus assorted fixes & improvements (#3646) 2024-04-26 17:35:22 -04:00
ip_fmt.c Code cleanup to sort out warnings. 2021-07-29 13:47:45 +10:00
nodemcu.lf Port Terry's Lua 5.1 + 5.3 work from the esp8266 branch. 2021-08-22 02:03:05 +10:00
user_main.c Fix uart.on('data') on console 2024-05-21 16:22:51 +10:00