]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
adc.pl: Remove unneeded code
authorAndreas Neiser <neiser@kph.uni-mainz.de>
Fri, 28 Nov 2014 16:39:06 +0000 (17:39 +0100)
committerAndreas Neiser <neiser@kph.uni-mainz.de>
Fri, 28 Nov 2014 16:39:06 +0000 (17:39 +0100)
tools/adc.pl

index 7a61bb74dc6ea727d3367d6584e7f8e3d48f4f88..5ba39065a3702413c7c8596132a7819d136978d2 100755 (executable)
@@ -63,22 +63,8 @@ sub sendcmd {
   return trb_register_read($board,0xd412);
 }
 
-sub sendcmd_bitbang {
-  my $cmd = shift;
-  #csb low
-  trb_register_write($board,0xa080,0x11);
-
-  for my $j (0..23) {
-    my $b = ($cmd>>(23-$j)) & 1;
-    $b = $b << 5;
-    trb_register_write($board,0xa080,0x01 | $b);
-    trb_register_write($board,0xa080,0x11 | $b);
-    }
-   #csb high
-  trb_register_write($board,0xa080,0x51);
-}
 
-sub sendcmd_bitbang_single {
+sub sendcmd_bitbang {
   my $cmd = shift;
   # we use the padiwa register to control
   # so set the global CSB high (and keep it high, see for loop
@@ -227,7 +213,7 @@ sub sendcmd_adc {
   # the instruction bits is simply the $adc_reg value, since
   # the bit31 should be zero for writing, and bit30/29 should be
   # 0 to request to write one byte
-  sendcmd_bitbang_single(  ($adc_reg << 8)
+  sendcmd_bitbang(  ($adc_reg << 8)
           + ($adc_val << 0));#,
           #$chain{adc});