diff options
author | John Klug <john.klug@multitech.com> | 2020-11-11 16:17:52 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2020-11-11 16:17:52 -0600 |
commit | 4bb6f26b05450777d14aa96e10783066c2503dc2 (patch) | |
tree | 3ed6c4bb86736d28926fd37a3c2b4eb81de44c82 /recipes-bsp/multitech/mts-io/lora-led-updater | |
download | meta-multitech-atmel-fc2577905bfab8d05f91c835e2bf821861e1d8b0.tar.gz meta-multitech-atmel-fc2577905bfab8d05f91c835e2bf821861e1d8b0.tar.bz2 meta-multitech-atmel-fc2577905bfab8d05f91c835e2bf821861e1d8b0.zip |
Diffstat (limited to 'recipes-bsp/multitech/mts-io/lora-led-updater')
-rwxr-xr-x | recipes-bsp/multitech/mts-io/lora-led-updater | 14 |
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 + |