aboutsummaryrefslogtreecommitdiffstats
path: root/gotrc-examples
diff options
context:
space:
mode:
Diffstat (limited to 'gotrc-examples')
-rw-r--r--gotrc-examples/baudrate20
1 files changed, 20 insertions, 0 deletions
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
+}
+