]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
Revert "update spi_slave"
authorHadaq <hadaq@jspc29>
Fri, 25 Oct 2019 12:55:55 +0000 (14:55 +0200)
committerHadaq <hadaq@jspc29>
Fri, 25 Oct 2019 12:55:55 +0000 (14:55 +0200)
This reverts commit 3b890b232faa40401ea456ee5948d44e6795458d.

tools/spi_slave.pl

index 132617adaa0960bc0268b52274add6c3fec885ad..860ad66b7bbc0c0ed82019587782d7960fab5893 100755 (executable)
@@ -107,15 +107,15 @@ sub conv_input_string_to_number {
 
 sub usage {
   print <<EOF;
-usage: spi_slave.pl <--endpoint|e=0xYYYY> <--chain|c=N> [--register=number] [--data=number]
-
-examples: spi_slave.pl -e 0x1212 -c 0 -x time                       # reads the compile time of 0x1212, chain 0
-          spi_slave.pl -e 0x1212 -c 0 -x pwm --channel=1            # reads the threshold setting of channel 1
-          spi_slave.pl -e=0x1212 -c=0 -x=inputenable --data=0xa55a  # disables some channels
-          spi_slave.pl --endpoint=0x1212 --chain=0 -x dischargedelayinvert -d 0xff # sets the dischargedelayinvert bits
-          spi_slave.pl --endpoint=0x1212 --chain=0 -x dischargedelayinvert         # reads the dischargedelayinvert register
-          spi_slave.pl -e 0x1212 -c 0 --enablecfgflash=1            # enables the access to the config-flash
-          spi_slave.pl --endpoint=0x1212 --chain=0 --dumpcfgflash > flash_dump.txt
+usage: spi_flash16bit_slaves.pl <--endpoint|e=0xYYYY> <--chain|c=N> [--register=number] [--data=number]
+
+examples: spi_flash16bit_slaves.pl -e 0x1212 -c 0 -x time                       # reads the compile time of 0x1212, chain 0
+          spi_flash16bit_slaves.pl -e 0x1212 -c 0 -x pwm --channel=1            # reads the threshold setting of channel 1
+          spi_flash16bit_slaves.pl -e=0x1212 -c=0 -x=inputenable --data=0xa55a  # disables some channels
+          spi_flash16bit_slaves.pl --endpoint=0x1212 --chain=0 -x dischargedelayinvert -d 0xff # sets the dischargedelayinvert bits
+          spi_flash16bit_slaves.pl --endpoint=0x1212 --chain=0 -x dischargedelayinvert         # reads the dischargedelayinvert register
+          spi_flash16bit_slaves.pl -e 0x1212 -c 0 --enablecfgflash=1            # enables the access to the config-flash
+          spi_flash16bit_slaves.pl --endpoint=0x1212 --chain=0 --dumpcfgflash > flash_dump.txt
           
           Some of the commands can also be used directly, i.e. '-rr=0x12' instead of '-x=rr -register=0x12'
 
@@ -478,14 +478,14 @@ if ($execute eq "writecfgflash" | defined $writecfgflash) {
        sendcmd16(@a);
        sendcmd(0x51<<$REGNR | $WRITE | 0x4);
        sendcmd(0x50<<$REGNR | $WRITE | $p);
-
+       
        $p++;
        printf(STDERR "\r%d ",$p) if(!($p%10));
     }
     my @a;
     for (my $i=0;$i<16;$i++) {
        if ($i eq 11) {
-           # adds the magic 09 the last page of the config flash
+           # adds the magic 09 the last page of the config flash   
            push(@a,0x40<<$REGNR | $i << $REGNR | $WRITE | 0x09);
        } else {
            push(@a,0x40<<$REGNR | $i << $REGNR | $WRITE | 0x0);
@@ -494,10 +494,10 @@ if ($execute eq "writecfgflash" | defined $writecfgflash) {
     sendcmd16(@a);
     sendcmd(0x51<<$REGNR | $WRITE | 0x4);
     if (($version & 0xFF00) eq 0x100) {
-       sendcmd(0x50<<$REGNR | $WRITE | 0x167e); # dirich2
+       sendcmd(0x50<<$REGNR | $WRITE | 0x167e);
     } else {
-       sendcmd(0x50<<$REGNR | $WRITE | 0x23fc); #padiwa amps2
-    }
+       sendcmd(0x50<<$REGNR | $WRITE | 0x23fc);   
+    } 
 }
 
 ###############################################################################