[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-264-g955fb1e
Brought to you by:
sszy
|
From: Fabien M <fa...@us...> - 2010-03-24 08:24:10
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 955fb1e2cb082de48d8613570dfc02db734b616a (commit)
from 2043bcd322d66bda218d4d5680bb48d27f52de5e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 955fb1e2cb082de48d8613570dfc02db734b616a
Author: Fabien Marteau <fab...@ar...>
Date: Wed Mar 24 09:23:41 2010 +0100
[as_devices] AsGpio python wrapper done
-----------------------------------------------------------------------
Summary of changes:
.../packages/as_devices/python/AsDevices/AsGpio.py | 24 ++++++++++++++++++-
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/target/packages/as_devices/python/AsDevices/AsGpio.py b/target/packages/as_devices/python/AsDevices/AsGpio.py
index 2e09403..a0abe68 100644
--- a/target/packages/as_devices/python/AsDevices/AsGpio.py
+++ b/target/packages/as_devices/python/AsDevices/AsGpio.py
@@ -60,7 +60,7 @@ class AsGpio:
try:
wrapper.gpio_close(self.__device)
except Exception, e:
- raise AsGpioError(str(e))
+ pass
def setPinDirection(self, aPinNum, aDirection):
""" Set period in us
@@ -72,6 +72,26 @@ class AsGpio:
except Exception, e:
raise AsGpioError(str(e))
+ def setPinValue(self, aPinNum, aValue):
+ """ Set pin value
+ \param aPinNum pin number
+ \param aValue value to write
+ """
+ try:
+ wrapper.setPinValue(self.__device, aPinNum, aValue)
+ except Exception, e:
+ raise AsGpioError(str(e))
+
+ def getPinValue(self, aPinNum):
+ """ Get pin value
+ \param aPinNum pin number
+ \return pin value
+ """
+ try:
+ return wrapper.getPinValue(self.__device, aPinNum)
+ except Exception, e:
+ raise AsGpioError(str(e))
+
################################################################
@@ -79,7 +99,7 @@ class AsGpio:
def getInstance(cls, aPort_letter):
if type(aPort_letter)!=str:
raise Exception("port letter must be a character")
- if ((aPort_letter[0] <= 'A') or (aPort_letter[0] >= 'Z')):
+ if ((aPort_letter[0] < 'A') or (aPort_letter[0] > 'Z')):
raise Exception("Port letter must be an UPPER case letter")
try:
hooks/post-receive
--
armadeus
|