summaryrefslogtreecommitdiffstats
path: root/tests/grab.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-14 03:50:48 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-14 03:50:48 +0100
commit667c1e8a83b3f5f8e90af824212c8da389f849d2 (patch)
treeb5e3573a8780c533985fee2ccdc5f0718f501419 /tests/grab.sh
parentc4c9ad7708ddd3114f78c5f860ebfeb92cfb79c3 (diff)
downloadpcitool-667c1e8a83b3f5f8e90af824212c8da389f849d2.tar.gz
pcitool-667c1e8a83b3f5f8e90af824212c8da389f849d2.tar.bz2
pcitool-667c1e8a83b3f5f8e90af824212c8da389f849d2.tar.xz
pcitool-667c1e8a83b3f5f8e90af824212c8da389f849d2.zip
few demo scripts
Diffstat (limited to 'tests/grab.sh')
-rwxr-xr-xtests/grab.sh25
1 files changed, 16 insertions, 9 deletions
diff --git a/tests/grab.sh b/tests/grab.sh
index 35e690b..5fa6100 100755
--- a/tests/grab.sh
+++ b/tests/grab.sh
@@ -5,13 +5,20 @@ function pci {
LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci $*
}
-rm -f image.raw
+rm -f images.raw
-echo "Reset..."
-pci --reset
-echo "Stop DMA..."
-pci --stop-dma
-echo "Start DMA..."
-pci --start-dma dma1
-echo "Request..."
-pci -g -o image.raw
+
+echo "Starting the grabber"
+pci -g -o images.raw --run-time 3000000 &
+pid=$!
+
+usleep 1000000
+
+for i in `seq 1 10`; do
+ echo "Trigger $i"
+ pci --trigger
+ usleep 100000
+done
+
+echo "Waiting grabber to finish"
+wait $pid