| Device-ParallelPort documentation | Contained in the Device-ParallelPort distribution. |
Device::ParallelPort::drv::dummy_bit - Dummy driver. Pretend to work.
This is a dummy driver. Purely built to test the primary driver.
None what so ever. Basically just store bits in an array !
Copyright (c) 2002,2004 Scott Penrose. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Scott Penrose scottp@dd.com.au, http://linux.dd.com.au/
| Device-ParallelPort documentation | Contained in the Device-ParallelPort distribution. |
package Device::ParallelPort::drv::dummy_bit; use strict; use Carp;
use base qw/Device::ParallelPort::drv/; sub init { my ($this, @params) = @_; $this->{BITS} = []; } sub INFO { return { 'os' => 'any', 'type' => 'bit', }; } sub set_bit { my ($this, $bit, $val) = @_; $this->{BITS}[$bit] = $val ? 1 : 0; } sub get_bit { my ($this, $bit) = @_; return $this->{BITS}[$bit] ? 1 : 0; } 1;