Device-ParallelPort-JayCar
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
my ($this, $id, $delay) = @_;
$this->_checkid($id);
$this->{RELAY}[$id] = 0;
$this->update unless ($delay);
}
# Update the device.
# Need: NA
# Return: NA
# How: Use parport to update byte and then flash it.
sub update {
my ($this) = @_;
foreach my $board (@{$this->{BOARDS}}) {
$this->_parport->set_byte(2, chr($cardmap{$board})); # Prepare
$this->_parport->set_byte(0, chr($this->_byte_calc($board))); # Set data
$this->_parport->set_byte(2, chr($cardmap{$board} + 1)); # Flash bit 1 (strobe)
$this->_parport->set_byte(2, chr($cardmap{$board})); # Undo flash/strobe
}
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.537 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )