File: MCP3004.pm

package info (click to toggle)
libhipi-perl 0.93-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 20,048 kB
  • sloc: perl: 471,917; ansic: 22; makefile: 10
file content (50 lines) | stat: -rw-r--r-- 1,305 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#########################################################################################
# Package       HiPi::Interface::MCP3004
# Description:  compatibility
# Created       Sun Dec 02 01:42:27 2012
# Copyright    : Copyright (c) 2013-2017 Mark Dootson
# License      : This is free software; you can redistribute it and/or modify it under
#                the same terms as the Perl 5 programming language system itself.
#########################################################################################

package HiPi::Interface::MCP3004;

#########################################################################################

use strict;
use warnings;

use parent qw( HiPi::Interface::MCP3ADC );
use HiPi qw( :mcp3adc );

our $VERSION = '0.59';

our @EXPORT = ();
our @EXPORT_OK = ();
our %EXPORT_TAGS = ( all => \@EXPORT_OK );

# compatibility
{
    my @const = qw(
        MCP3004_S0 MCP3004_S1 MCP3004_S2 MCP3004_S3
        MCP3004_DIFF_0_1 MCP3004_DIFF_1_0
        MCP3004_DIFF_2_3 MCP3004_DIFF_3_2
    );
    
    push( @EXPORT_OK, @const );
    $EXPORT_TAGS{mcp} = \@const;
}


sub new {
    my ($class, %params) = @_;
    
    $params{ic} = MCP3004;
    
    my $self = $class->SUPER::new( %params );
    return $self;
}

1;

__END__