From a79b2af79c7d8a202eb212aeb815a89494153d9a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 27 Oct 2013 02:26:30 +0100 Subject: add baudrate module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- gotrc-examples/baudrate | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gotrc-examples/baudrate diff --git a/gotrc-examples/baudrate b/gotrc-examples/baudrate new file mode 100644 index 0000000..2b8a95c --- /dev/null +++ b/gotrc-examples/baudrate @@ -0,0 +1,20 @@ +# -*- shell-script -*- + +# This module allows you to configure baudrate on the computer-side +# of a serial terminal by setting the environment variable BAUDRATE +# to the baudrate in the baud unit, with only ditial. +# +# It is highly recommended to set this as the first loaded module +# so that the output does not get mangled. + + +display_function_baudrate=$display_function +display_function=_display_baudrate + +_display_baudrate () +{ + if [ ! "${BAUDRATE}" = "" ]; then + stty ${BAUDRATE} + fi +} + -- cgit v1.2.3-70-g09d2