-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathwiringpi.pm
78 lines (61 loc) · 1.77 KB
/
wiringpi.pm
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
package wiringpi;
use base qw(Exporter);
use base qw(DynaLoader);
package wiringpic;
bootstrap wiringpi;
package wiringpi;
@EXPORT = qw();
# ---------- BASE METHODS -------------
package wiringpi;
sub TIEHASH {
my ($classname,$obj) = @_;
return bless $obj, $classname;
}
sub CLEAR { }
sub FIRSTKEY { }
sub NEXTKEY { }
sub FETCH {
my ($self,$field) = @_;
my $member_func = "swig_${field}_get";
$self->$member_func();
}
sub STORE {
my ($self,$field,$newval) = @_;
my $member_func = "swig_${field}_set";
$self->$member_func($newval);
}
sub this {
my $ptr = shift;
return tied(%$ptr);
}
# ------- FUNCTION WRAPPERS --------
package wiringpi;
*wiringPiSetup = *wiringpic::wiringPiSetup;
*wiringPiSetupSys = *wiringpic::wiringPiSetupSys;
*wiringPiSetupGpio = *wiringpic::wiringPiSetupGpio;
*wiringPiGpioMode = *wiringpic::wiringPiGpioMode;
*pullUpDnControl = *wiringpic::pullUpDnControl;
*pinMode = *wiringpic::pinMode;
*digitalWrite = *wiringpic::digitalWrite;
*pwmWrite = *wiringpic::pwmWrite;
*digitalRead = *wiringpic::digitalRead;
*shiftOut = *wiringpic::shiftOut;
*shiftIn = *wiringpic::shiftIn;
*delay = *wiringpic::delay;
*delayMicroseconds = *wiringpic::delayMicroseconds;
*millis = *wiringpic::millis;
*serialOpen = *wiringpic::serialOpen;
*serialClose = *wiringpic::serialClose;
*serialPutchar = *wiringpic::serialPutchar;
*serialPuts = *wiringpic::serialPuts;
*serialDataAvail = *wiringpic::serialDataAvail;
*serialGetchar = *wiringpic::serialGetchar;
*serialPrintf = *wiringpic::serialPrintf;
# ------- VARIABLE STUBS --------
package wiringpi;
1;