summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mts-io/lora-led-updater
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-11-11 16:17:52 -0600
committerJohn Klug <john.klug@multitech.com>2020-11-11 16:17:52 -0600
commit4bb6f26b05450777d14aa96e10783066c2503dc2 (patch)
tree3ed6c4bb86736d28926fd37a3c2b4eb81de44c82 /recipes-bsp/multitech/mts-io/lora-led-updater
downloadmeta-multitech-atmel-fc2577905bfab8d05f91c835e2bf821861e1d8b0.tar.gz
meta-multitech-atmel-fc2577905bfab8d05f91c835e2bf821861e1d8b0.tar.bz2
meta-multitech-atmel-fc2577905bfab8d05f91c835e2bf821861e1d8b0.zip
Add new BSP submodule for Atmel Processors.5.3.0b5.3.0a
Diffstat (limited to 'recipes-bsp/multitech/mts-io/lora-led-updater')
-rwxr-xr-xrecipes-bsp/multitech/mts-io/lora-led-updater14
1 files changed, 14 insertions, 0 deletions
diff --git a/recipes-bsp/multitech/mts-io/lora-led-updater b/recipes-bsp/multitech/mts-io/lora-led-updater
new file mode 100755
index 0000000..0e38310
--- /dev/null
+++ b/recipes-bsp/multitech/mts-io/lora-led-updater
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+while true; do
+ # If driver is unloaded, stop.
+ [[ -d /sys/devices/platform/mts-io ]] || exit 0
+ fuser /dev/spidev0.0 > /dev/null
+ if [ $? == 0 ]; then
+ mts-io-sysfs store led-lora 1 >/dev/null 2>&1
+ else
+ mts-io-sysfs store led-lora 0 >/dev/null 2>&1
+ fi
+ sleep 5
+done
+