#!/bin/sh
#############################################################
# Reset radio module hardware
#############################################################
path="${0%/*}"
. "$path/inc/gwhw.inc"

needRoot

testcmd2 gpiofind
testcmd2 gpioset

#############################################################
RST="$(gpiofind "${RADIO_RST}")"

[ -z "${RST}" ] && die "Reset pin not found (${RADIO_RST})"

RST_ON="${RST}=0"
RST_OFF="${RST}=1"

gpioset ${RST_ON}
sleep 1
gpioset ${RST_OFF}



