summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanh Tran <ttran@multitech.com>2011-09-01 10:13:24 -0500
committerThanh Tran <ttran@multitech.com>2011-09-01 10:13:24 -0500
commit39b92baf372e0f9dbb4198e5338d261b995ecf6e (patch)
treeeef0edf1e64813e41d4bd2ab1a12acaef708f097
parent4afeacb37962034c35249d18b56716c8ea04a7ad (diff)
downloadcdp-io-controller-39b92baf372e0f9dbb4198e5338d261b995ecf6e.tar.gz
cdp-io-controller-39b92baf372e0f9dbb4198e5338d261b995ecf6e.tar.bz2
cdp-io-controller-39b92baf372e0f9dbb4198e5338d261b995ecf6e.zip
Modified "Usage:" by determine which platform is currently running and display "Usage:" accordingly.
-rwxr-xr-xio-tool/mts-io-sysfs66
1 files changed, 66 insertions, 0 deletions
diff --git a/io-tool/mts-io-sysfs b/io-tool/mts-io-sysfs
index 4afdcb1..42f3380 100755
--- a/io-tool/mts-io-sysfs
+++ b/io-tool/mts-io-sysfs
@@ -63,6 +63,71 @@ usage() {
out=${1}
fi
+GPIO11_FILE="/sys/devices/platform/mtcdp/gpio11"
+
+if [ -f $GPIO11_FILE ];
+then
+ printf "Usage: ${PROGRAM} [ OPTIONS ] OBJECT [--] [ ARGUMENTS ]\n" >&${out}
+ printf "where OBJECT := {\n" >&${out}
+ printf " show SHOW-NAME |\n" >&${out}
+ printf " store STORE-NAME |\n" >&${out}
+ printf " }\n" >&${out}
+ printf "\n" >&${out}
+ printf " SHOW-NAME := {\n" >&${out}
+ printf " board-temperature |\n" >&${out}
+ printf " radio-reset |\n" >&${out}
+ printf " eth0-enabled |\n" >&${out}
+ printf " rsersrc |\n" >&${out}
+ printf " extserial-dcd |\n" >&${out}
+ printf " extserial-dtr |\n" >&${out}
+ printf " gpio11 |\n" >&${out}
+ printf " gpio12 |\n" >&${out}
+ printf " led1 |\n" >&${out}
+ printf " led2 |\n" >&${out}
+ printf " led3 |\n" >&${out}
+ printf " led4 |\n" >&${out}
+ printf " led5 |\n" >&${out}
+ printf " led6 |\n" >&${out}
+ printf " gpi5 |\n" >&${out}
+ printf " gpi6 |\n" >&${out}
+ printf " gpi7 |\n" >&${out}
+ printf " gpi8 |\n" >&${out}
+ printf " gpi9 |\n" >&${out}
+ printf " gpi10 |\n" >&${out}
+ printf " gpo1 |\n" >&${out}
+ printf " gpo2 |\n" >&${out}
+ printf " gpo3 |\n" >&${out}
+ printf " gpo4 |\n" >&${out}
+ printf " adc{0-3} |\n" >&${out}
+ printf " }\n" >&${out}
+ printf "\n" >&${out}
+ printf " STORE-NAME := {\n" >&${out}
+ printf " radio-reset { 0 } |\n" >&${out}
+ printf " rsersrc BOOLEAN |\n" >&${out}
+ printf " eth0-enabled BOOLEAN |\n" >&${out}
+ printf " extserial-dcd BOOLEAN |\n" >&${out}
+ printf " gpio11 BOOLEAN |\n" >&${out}
+ printf " gpio12 BOOLEAN |\n" >&${out}
+ printf " led1 BOOLEAN |\n" >&${out}
+ printf " led2 BOOLEAN |\n" >&${out}
+ printf " led4 BOOLEAN |\n" >&${out}
+ printf " led5 BOOLEAN |\n" >&${out}
+ printf " led6 BOOLEAN |\n" >&${out}
+ printf " gpo1 BOOLEAN |\n" >&${out}
+ printf " gpo2 BOOLEAN |\n" >&${out}
+ printf " gpo3 BOOLEAN |\n" >&${out}
+ printf " gpo4 BOOLEAN |\n" >&${out}
+ printf " }\n" >&${out}
+ printf "\n" >&${out}
+ printf " OPTIONS := {\n" >&${out}
+ printf " --verbose\n" >&${out}
+ printf " }\n" >&${out}
+ printf "\n" >&${out}
+ printf " BOOLEAN := { OFF | ON }\n" >&${out}
+ printf " OFF := 0\n" >&${out}
+ printf " ON := 1\n" >&${out}
+ printf "\n" >&${out}
+else
printf "Usage: ${PROGRAM} [ OPTIONS ] OBJECT [--] [ ARGUMENTS ]\n" >&${out}
printf "where OBJECT := {\n" >&${out}
printf " show SHOW-NAME |\n" >&${out}
@@ -139,6 +204,7 @@ fi
printf " ON := 1\n" >&${out}
printf " LED-FLASHING := 2\n" >&${out}
printf "\n" >&${out}
+fi #if GPIO11_FILE exist
}
ARGS=$(getopt -o "" --long verbose,version,help -n $0 -- "$@")