lib/Quancom.pm
branchtied
changeset 25 e3f3806a12ec
parent 24 a48c1d372ad4
equal deleted inserted replaced
24:a48c1d372ad4 25:e3f3806a12ec
    81     $self->cmd("WB 0007 00");
    81     $self->cmd("WB 0007 00");
    82 }
    82 }
    83 
    83 
    84 sub set {
    84 sub set {
    85     my $self = shift;
    85     my $self = shift;
    86 
    86     croak "bad usage" if @_ < 2;
    87     croak "bad usage";
    87 
    88     my $value = pop @_ ? 1 : 0;
    88     my $value = pop @_ ? 1 : 0;
    89     my @bits   = map { $_ - 1 } @_;
    89     my @bits   = map { $_ - 1 } @_;
    90     my @groups = map { 0 } 0 .. 7;
    90     my @groups = map { 0 } 0 .. 7;
    91 
    91 
    92     # input is a list of bits to set and the value (0/1)
    92     # input is a list of bits to set and the value (0/1)