summarylogtreecommitdiffstats
path: root/lib_gpio-present.sh
diff options
context:
space:
mode:
authorLeo P2020-07-03 02:45:54 -0400
committerLeo P2020-07-03 02:45:54 -0400
commit818bc9594e3286566abc0f6bd9cd08fbf31df8ac (patch)
treec7598682e52f7948997ea11653ca67446e7c49cd /lib_gpio-present.sh
parent837551f6d4240edd236a88bd83d075952ceeef13 (diff)
downloadaur-atomicpi-utils.tar.gz
moved sources to external repo, added licence and upstream URL
Diffstat (limited to 'lib_gpio-present.sh')
-rw-r--r--lib_gpio-present.sh12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib_gpio-present.sh b/lib_gpio-present.sh
deleted file mode 100644
index af6f9fc9c980..000000000000
--- a/lib_gpio-present.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-gpio_present() {
- for CHIP in /sys/class/gpio/gpiochip*; do
- if [ -d "$CHIP" ]; then
- BASE=`cat "$CHIP/base" || true`
- NGPIO=`cat "$CHIP/ngpio" || true`
- if [ -n "$BASE" ] && [ -n "$NGPIO" ] && [ "$1" -ge "$BASE" ] && [ "$1" -lt "$(($BASE+$NGPIO))" ]; then
- return 0
- fi
- fi
- done
- return 1
-}