Hey,

I’m looking at adding “serial” support to mynewt as a side project.

As I would typically see this architected, it would look like:

—
console | serial | pty
—
tty
—
uart

Where the tty support is below the console and serial port, and handles things like flow control and terminal ready.

Currently the architecture has tty in console_tty.c and flow control handling is left to the UART hal (RTS/CTS handshaking.).

I think the UART HAL should handle RTS/CTS handshaking, but I’m wondering if we shouldn’t move to an architecture where we have a package, sys/tty which maintains the ring buffer, along with terminal settings (DTR/DCD).

The other alternative is to just re-implement that directly in a serial_* library, which seems fine to me as well. Our console doesn’t exactly need to run on top of complex TTYs.

Thoughts?

Sterling

Reply via email to