summaryrefslogtreecommitdiffstats
path: root/pytools
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2016-06-10 00:29:50 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2016-06-10 18:07:15 -0400
commit0b380f7bf0f4d2c9c0460189897ada8eb8c01570 (patch)
tree26c6a6c3cd270bf850fe927033fffdde55112dbc /pytools
parent40a360c2a4feef97a8f7041e655b2a42e51e0224 (diff)
downloadtalos-skeleton-0b380f7bf0f4d2c9c0460189897ada8eb8c01570.tar.gz
talos-skeleton-0b380f7bf0f4d2c9c0460189897ada8eb8c01570.zip
Install python workbook to well-known location
This removes the need to pass the system configuration to all the scripts. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'pytools')
-rw-r--r--pytools/gpioutil15
1 files changed, 6 insertions, 9 deletions
diff --git a/pytools/gpioutil b/pytools/gpioutil
index ab44b4d..b6ec5ea 100644
--- a/pytools/gpioutil
+++ b/pytools/gpioutil
@@ -3,25 +3,22 @@
import sys
import os
import getopt
+import obmc_system_config as System
def printUsage():
print '\nUsage:'
- print 'gpioutil SYSTEM_NAME -n GPIO_NAME [-v value]'
- print 'gpioutil SYSTEM_NAME -i GPIO_NUM -d <DIRECTION = in,out,falling,rising,both> [-v value]'
- print 'gpioutil SYSTEM_NAME -p PIN_NAME -d <DIRECTION = in,out,falling,rising,both> [-v value]'
- print 'gpioutil SYSTEM_NAME -l PIN_NAME (lookup pin name only)'
+ print 'gpioutil -n GPIO_NAME [-v value]'
+ print 'gpioutil -i GPIO_NUM -d <DIRECTION = in,out,falling,rising,both> [-v value]'
+ print 'gpioutil -p PIN_NAME -d <DIRECTION = in,out,falling,rising,both> [-v value]'
+ print 'gpioutil -l PIN_NAME (lookup pin name only)'
exit(1)
-if (len(sys.argv) < 3):
+if (len(sys.argv) < 2):
printUsage()
-sys.argv.pop(0)
-libr = sys.argv.pop(0)
-System = __import__(libr)
-
GPIO_SYSFS = '/sys/class/gpio/'
class Gpio:
OpenPOWER on IntegriCloud