summaryrefslogtreecommitdiff
path: root/prog/maxilife/writelcd.sh
diff options
context:
space:
mode:
authormds <mds@7894878c-1315-0410-8ee3-d5d059ff63e0>2000-04-15 17:26:58 +0000
committermds <mds@7894878c-1315-0410-8ee3-d5d059ff63e0>2000-04-15 17:26:58 +0000
commitb831726653da1d0eb8a22f55dfafa3a013674443 (patch)
tree2fbbf89acd60cc23dcc1bdaab710d8dccc00ab88 /prog/maxilife/writelcd.sh
parent3417d58a96121689812b3def81f4c01e01928c03 (diff)
downloadlm-sensors-b831726653da1d0eb8a22f55dfafa3a013674443.tar.gz
(mds) new Maxilife tools from Fons R.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@791 7894878c-1315-0410-8ee3-d5d059ff63e0
Diffstat (limited to 'prog/maxilife/writelcd.sh')
-rw-r--r--prog/maxilife/writelcd.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/prog/maxilife/writelcd.sh b/prog/maxilife/writelcd.sh
new file mode 100644
index 00000000..ccef350d
--- /dev/null
+++ b/prog/maxilife/writelcd.sh
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+usage() {
+ echo "usage: $0 <string> <line>"
+ echo " <string> must be <= 16 characters"
+ echo " <line> lcd line number, between 1..4"
+}
+
+if [ $# != 2 ]; then
+ usage
+ exit 1
+fi
+
+str=$1
+line=$2
+
+if [ $[line < 1 || line > 4] = 1 ]; then
+ usage
+ exit 1
+fi
+
+sysctl=/proc/sys/dev/sensors/maxilife-nba-i2c-0-14/lcd
+
+printf "%-16.16s" "$str" | od -A n -l > $sysctl$line
+
+exit 0