From b7aeb9b06d8808134e5bc0062868255bded3348c Mon Sep 17 00:00:00 2001 From: Vladimir Vassilev Date: Mon, 20 Jan 2025 22:56:10 +0100 Subject: Release ice4pi-2.4.3 --- example/ice4pi_prog | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'example/ice4pi_prog') diff --git a/example/ice4pi_prog b/example/ice4pi_prog index 9e90f7c..37391f3 100755 --- a/example/ice4pi_prog +++ b/example/ice4pi_prog @@ -1,16 +1,24 @@ #!/bin/bash +dtparam spi=on gpioset `gpiofind GPIO24`=1 -sleep 1 +sleep 0.1 gpioset `gpiofind GPIO24`=0 tr '\0' '\377' < /dev/zero | dd bs=1M count=4 of=image iflag=fullblock dd if=${1} conv=notrunc of=image flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=20000 -w image #workaround first time fails after initial programming -flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=20000 -w image +#flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=20000 -w image +dtparam spi=off gpioset `gpiofind GPIO24`=1 -sleep 1 -gpioget `gpiofind GPIO24` -gpioget `gpiofind GPIO25` +#gpioget `gpiofind GPIO24` + +val="0" +while [ "$val" == "0" ] ; do + val=`gpioget \`gpiofind GPIO25\`` + echo $val + sleep 0.1 +done +dtparam spi=on -- cgit v1.2.3