print "\t dac \t\t set LTC-DAC value. options: \$channel, \$value\n";
print "\t pwm \t\t set PWM value. options: \$channel, \$value\n";
print "\t \t\t read PWM value. options: \$channel\n";
+ print "\t comp \t\t set temperature compensation value. options: \$value\n";
+ print "\t \t\t read temperature compensation value. no options\n";
print "\t disable \t set input diable. options: \$mask\n";
print "\t \t\t read input disable. no options\n";
print "\t input \t\t read input status. no options\n";
printf("0x%04x\t%d\t%d\t0x%04x\t%4.2f\n",$e,$chain,$ARGV[3],$b->{$e}&0xffff,($b->{$e}&0xffff)*3300/65536);
}
}
+
+if($ARGV[2] eq "comp" && defined $ARGV[3]) {
+ my $b = sendcmd(0x20860000+($mask&0xffff));
+ print "Wrote Temperature Compensation settings.\n";
+ }
+if($ARGV[2] eq "comp") {
+ my $b = sendcmd(0x20060000);
+ foreach my $e (sort keys %$b) {
+ printf("0x%04x\t%d\t0x%04x\n",$e,$chain,$b->{$e}&0xffff);
+ }
+ }
if($ARGV[2] eq "disable" && defined $ARGV[3]) {
my $b = sendcmd(0x20800000+($mask&0xffff));