Add the ability to send a break to the remote side

We'll watch the UART stream for a special sequence of commands and use
that to know when to send a break.  This is useful for sending the
MAGIC SYSRQ to a remote host over serial.

The special sequence is "<CR>`z" and is currently hardcoded.  Also
note that we only look for the sequence if we're receiving one byte at
a time which is a slight attempt to keep us from interpreting binary
data as an escape sequence.

BUG=None
TEST=Send an escape sequence and get MAGIC SYSRQ on Linux.

Change-Id: Ie6969f8dff7ba81b299697836c01e07d3c868141
Reviewed-on: https://chromium-review.googlesource.com/175971
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Queue: Doug Anderson <dianders@chromium.org>
1 file changed