You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Sterling Hughes <st...@gmail.com> on 2017/02/12 17:46:20 UTC

serial library and termios

Hey,

I\u2019m looking at adding \u201cserial\u201d support to mynewt as a side 
project.

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

\u2014
console | serial | pty
\u2014
tty
\u2014
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\u2019m 
wondering if we shouldn\u2019t 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\u2019t 
exactly need to run on top of complex TTYs.

Thoughts?

Sterling