From 168ec3fd7f7b491cc8ffda7d32841ce7addb3125 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Wed, 2 Oct 2013 15:49:02 +0200 Subject: [PATCH] updated padiwa.pl with new features, fixed onewire reset --- tools/padiwa.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/padiwa.pl b/tools/padiwa.pl index e3d5791..11c3c42 100755 --- a/tools/padiwa.pl +++ b/tools/padiwa.pl @@ -41,7 +41,7 @@ if(!(defined $ARGV[0]) || !(defined $ARGV[1]) || !(defined $ARGV[2])) { print "\t enablecfg\t enable or disable access to configuration flash, options: 1/0\n"; print "\t dumpcfg \t Dump content of configuration flash. Pipe output to file\n"; print "\t writecfg \t Write content of configuration flash. options: \$filename\n"; - + print "\t fifo \t\t Read a byte from the test fifo (if present, no options\n"; exit; } my $board, my $value, my $mask; @@ -93,7 +93,7 @@ if($ARGV[2] eq "temp") { if($ARGV[2] eq "resettemp") { sendcmd(0x10800001); usleep(100000); - sendcmd(0x10800001); + sendcmd(0x10800000); } @@ -272,4 +272,12 @@ if($ARGV[2] eq "writecfg" && defined $ARGV[3]) { $p++; printf(STDERR "\r%d / 5760",$p) if(!($p%10)); } - } \ No newline at end of file + } + +if($ARGV[2] eq "fifo" || $ARGV[2] eq "ffarr") { + my $b = sendcmd(0x200a0000); + foreach my $e (sort keys %$b) { + printf("0x%04x\t%d\t0x%04x\n",$e,$chain,$b->{$e}&0xffff); + } + } + -- 2.43.0