]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
added lokcing in getpadiwa
authorJan Michel <j.michel@gsi.de>
Thu, 26 Jun 2014 14:34:42 +0000 (16:34 +0200)
committerJan Michel <j.michel@gsi.de>
Thu, 26 Jun 2014 14:35:05 +0000 (16:35 +0200)
web/htdocs/commands/getpadiwa.pl

index 6ebbcdc228162718b4bf638108c4a6a599f6cfeb..d4b7a5d30edb5017cff85ade46a8811b01fd9fdd 100755 (executable)
@@ -35,8 +35,10 @@ $board = hex($board);
  
 sub sendcmd {
   my ($cmd,$chain) = @_;
-  my $c = [$cmd,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1<<$chain,1];
-  trb_register_write_mem($board,0xd400,0,$c,scalar @{$c});
+  my $c = [$cmd,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1<<$chain,0x10001];
+  do{
+    trb_register_write_mem($board,0xd400,0,$c,scalar @{$c});
+    } while(trb_strerror() ne "No Error");
   return trb_register_read($board,0xd412);
   }