Commit graph

2 commits

Author SHA1 Message Date
Björn Stenberg 8cdcb2c167 uart_native_tty: Emulate an interrupt driven uart
Emulate SERIAL_SUPPORT_INTERRUPT for UART_NATIVE_TTY, using a thread that
polls the tty and invokes the callback.

This allows interrupt-driven subsystems such as modbus to use a native tty,
which is useful for testing purposes.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
2024-02-27 14:49:02 +01:00
Marko Sagadin 54cbf45c74 drivers: uart: add support for serial ports on native posix
Add support for communication with serial ports on native POSIX platform
via UART driver API. Serial port driver supports polling API,
configuration of the serial ports used via devicetree and command line
options, and runtime configuration with `uart_configure`.
Multiple instances of the driver are supported.
Example use and configuration is also demonstrated in the
`samples/drivers/uart/native_tty` sample.

Closes: #56586

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-06-21 09:27:22 +02:00