line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Device::ParallelPort::drv::dummy_bit; |
2
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
3
|
1
|
|
|
1
|
|
7
|
use Carp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
857
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Device::ParallelPort::drv::dummy_bit - Dummy driver. Pretend to work. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 DESCRIPTION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
This is a dummy driver. Purely built to test the primary driver. |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 CAPABILITIES |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
None what so ever. Basically just store bits in an array ! |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 COPYRIGHT |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Copyright (c) 2002,2004 Scott Penrose. All rights reserved. |
20
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
21
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 AUTHOR |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Scott Penrose L, L |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 SEE ALSO |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
L |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
12
|
use base qw/Device::ParallelPort::drv/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1109
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub init { |
36
|
1
|
|
|
1
|
0
|
4
|
my ($this, @params) = @_; |
37
|
1
|
|
|
|
|
11
|
$this->{BITS} = []; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub INFO { |
41
|
|
|
|
|
|
|
return { |
42
|
7
|
|
|
7
|
0
|
1493
|
'os' => 'any', |
43
|
|
|
|
|
|
|
'type' => 'bit', |
44
|
|
|
|
|
|
|
}; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub set_bit { |
48
|
11
|
|
|
11
|
1
|
16
|
my ($this, $bit, $val) = @_; |
49
|
11
|
100
|
|
|
|
449
|
$this->{BITS}[$bit] = $val ? 1 : 0; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub get_bit { |
53
|
54
|
|
|
54
|
1
|
171
|
my ($this, $bit) = @_; |
54
|
54
|
100
|
|
|
|
754
|
return $this->{BITS}[$bit] ? 1 : 0; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|