[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-559-g1794d9a
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2010-07-28 15:23:38
|
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 1794d9a4a59d0fa566494ca4dced70bf6e176cd1 (commit)
from 4bcbe72de1441b11f0ca3180b8472707f9c3f75b (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 1794d9a4a59d0fa566494ca4dced70bf6e176cd1
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jul 28 13:42:07 2010 +0200
[TOOLS] Add error message to gpio_set_value when corresponding /dev/gpio/PXnn is not available
-----------------------------------------------------------------------
Summary of changes:
target/linux/modules/gpio/gpio_helpers.sh | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/target/linux/modules/gpio/gpio_helpers.sh b/target/linux/modules/gpio/gpio_helpers.sh
index 928ee7c..06cf193 100755
--- a/target/linux/modules/gpio/gpio_helpers.sh
+++ b/target/linux/modules/gpio/gpio_helpers.sh
@@ -26,10 +26,14 @@ gpio_set_value()
{
GPIO=$1
VALUE=$2
- if [ "$VALUE" == "1" ]; then
- echo -ne "\x01" > $GPIO_DEV_DIR/$GPIO
+ if [ -c "$GPIO_DEV_DIR/$GPIO" ]; then
+ if [ "$VALUE" == "1" ]; then
+ echo -ne "\x01" > $GPIO_DEV_DIR/$GPIO
+ else
+ echo -ne "\x00" > $GPIO_DEV_DIR/$GPIO
+ fi
else
- echo -ne "\x00" > $GPIO_DEV_DIR/$GPIO
+ echo "$GPIO GPIO not usable !"
fi
}
hooks/post-receive
--
armadeus
|