#!/bin/sh
#############################################################
# Just does agcio hardware reset
#############################################################
path="${0%/*}"
. "$path/inc/gwhw.inc"

needRoot

testcmd2 gpiofind
testcmd2 gpioset

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

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

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

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