summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD1
-rw-r--r--hid/Makefile10
2 files changed, 10 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f55fcd71..51d9e420 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -63,6 +63,7 @@ depends=(
openssl
platformio
avrdude-svn
+ wiringpi
make
patch
sudo
diff --git a/hid/Makefile b/hid/Makefile
index a46a66d0..6987ef52 100644
--- a/hid/Makefile
+++ b/hid/Makefile
@@ -12,7 +12,15 @@ _build:
install: upload
upload:
- platformio run --environment $(shell cat .current) --target upload
+ $(eval $@_CURRENT := $(shell cat .current))
+ bash -ex -c " \
+ current=`cat .current`; \
+ if [ '$($@_CURRENT)' == 'spi' ] || [ '$($@_CURRENT)' == 'aum' ]; then \
+ gpio -g write 25 1; \
+ gpio -g write 25 0; \
+ fi \
+ "
+ platformio run --environment '$($@_CURRENT)' --target upload
bootloader-spi: install-bootloader-spi