[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.0-24-g34865f3
Brought to you by:
sszy
|
From: Fabien M <fa...@us...> - 2012-09-19 12:19:11
|
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 34865f3932d2ec985e5f66e91717221dc655f2db (commit)
from 948aef1e66036d068c1a9956000592bf4c2ca1aa (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 34865f3932d2ec985e5f66e91717221dc655f2db
Author: Fabien Marteau <fab...@ar...>
Date: Wed Sep 19 14:18:38 2012 +0200
[as_devices] fix blockingGetPinValue parameters in ms
-----------------------------------------------------------------------
Summary of changes:
target/packages/as_devices/c/as_gpio.h | 2 +-
.../packages/as_devices/python/AsDevices/AsGpio.py | 15 +++++++--------
.../packages/as_devices/python/src/AsGpio_wrap.c | 6 +++++-
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/target/packages/as_devices/c/as_gpio.h b/target/packages/as_devices/c/as_gpio.h
index 35e1a10..e6d251f 100644
--- a/target/packages/as_devices/c/as_gpio.h
+++ b/target/packages/as_devices/c/as_gpio.h
@@ -101,7 +101,7 @@ int32_t as_gpio_wait_event(struct as_gpio_device *aDev, int aDelay_ms);
/** @brief Set pin irq mode
*
* @param gpio_dev as_gpio_device pointer structure
- * @param mode irq mode (rising/falling/both/none)
+ * @param mode irq mode ("rising"/"falling"/"both"/"none")
*
* @return error if negative
*/
diff --git a/target/packages/as_devices/python/AsDevices/AsGpio.py b/target/packages/as_devices/python/AsDevices/AsGpio.py
index 7160f61..6b61efc 100644
--- a/target/packages/as_devices/python/AsDevices/AsGpio.py
+++ b/target/packages/as_devices/python/AsDevices/AsGpio.py
@@ -22,6 +22,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+# TODO:
+# - Change name of function "blockingGetPinValue" to "WaitEvent" as named
+# under C library
+#
#-----------------------------------------------------------------------------
__doc__ = "This class drive ARMadeus board GPIO"
@@ -88,24 +92,19 @@ class AsGpio:
except Exception, e:
raise AsGpioError(str(e))
- def blockingGetPinValue(self, aDelay_s, aDelay_us=0):
+ def blockingGetPinValue(self, aDelay_ms):
""" Get pin value (blocking mode)
\param return pin value
"""
try:
return wrapper.blockingGetPinValue(self.__device,
- aDelay_s,
- aDelay_us)
+ aDelay_ms);
except Exception, e:
raise AsGpioError(str(e))
def setIrqMode(self, aMode):
""" Set irq Mode
- \param aMode.
- 1:MODE_NOINT
- 2:MODE_RISING
- 3:MODE_FALLING
- 4:MODE_BOTH
+ \param aMode. "none" "rising" "falling" "both"
"""
try:
return wrapper.setIrqMode(self.__device, aMode)
diff --git a/target/packages/as_devices/python/src/AsGpio_wrap.c b/target/packages/as_devices/python/src/AsGpio_wrap.c
index 7b594a8..1b11fe1 100644
--- a/target/packages/as_devices/python/src/AsGpio_wrap.c
+++ b/target/packages/as_devices/python/src/AsGpio_wrap.c
@@ -17,6 +17,10 @@
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** TODO:
+** - Change name of function "blockingGetPinValue" to "WaitEvent" as named
+** under C library
*/
#include "AsGpio_wrap.h"
#include "as_gpio.h"
@@ -235,7 +239,7 @@ static PyObject * blockingGetPinValue(PyObject *self, PyObject *args)
}
ret = as_gpio_wait_event(aFdev, aDelay_ms);
- if (ret == -10)
+ if (ret == -ETIMEDOUT)
{
PyErr_SetString(PyExc_IOError, "TIMEOUT");
return NULL;
hooks/post-receive
--
armadeus
|