From 291fed420fa8665fbd749a32ea98d5b2a50b7c57 Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Fri, 28 Nov 2014 17:39:06 +0100 Subject: [PATCH] adc.pl: Remove unneeded code --- tools/adc.pl | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/tools/adc.pl b/tools/adc.pl index 7a61bb7..5ba3906 100755 --- a/tools/adc.pl +++ b/tools/adc.pl @@ -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}); -- 2.43.0