nodemcu-firmware/components
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
..
base_nodemcu Fix uart.on('data') on console 2024-05-21 16:22:51 +10:00
driver_can Initial migration to IDFv5.0 2024-01-30 11:34:03 +11:00
driver_i2c Initial migration to IDFv5.0 2024-01-30 11:34:03 +11:00
embedded_lfs idf4: overhaul to new build system, part 1 of 3 2021-07-15 16:27:03 +10:00
lua Initial support for ESP32-C6 and ESP32-H2, plus assorted fixes & improvements (#3646) 2024-04-26 17:35:22 -04:00
modules Fix uart.on('data') on console 2024-05-21 16:22:51 +10:00
platform Fix uart.on('data') on console 2024-05-21 16:22:51 +10:00
qrcodegen idf4: overhaul to new build system, part 1 of 3 2021-07-15 16:27:03 +10:00
rtos_dbg Initial migration to IDFv5.0 2024-01-30 11:34:03 +11:00
sjson Code cleanup to sort out warnings. 2021-07-29 13:47:45 +10:00
task Initial support for ESP32-C6 and ESP32-H2, plus assorted fixes & improvements (#3646) 2024-04-26 17:35:22 -04:00
u8g2 Code cleanup to sort out warnings. 2021-07-29 13:47:45 +10:00
ucg Code cleanup to sort out warnings. 2021-07-29 13:47:45 +10:00
uzlib Initial support for ESP32-C6 and ESP32-H2, plus assorted fixes & improvements (#3646) 2024-04-26 17:35:22 -04:00