-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGPIO_stub.py
101 lines (82 loc) · 1.67 KB
/
GPIO_stub.py
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/python3
'''
Documentation, License etc.
@package light_control
'''
class GPIO(object):
WPI_MODE_PINS = 0
WPI_MODE_GPIO = 1
WPI_MODE_GPIO_SYS = 2
WPI_MODE_PHYS = 3
WPI_MODE_PIFACE = 4
WPI_MODE_UNINITIALISED = -1
INPUT = 0
OUTPUT = 1
PWM_OUTPUT = 2
GPIO_CLOCK = 3
LOW = 0
HIGH = 1
PUD_OFF = 0
PUD_DOWN = 1
PUD_UP = 2
PWM_MODE_MS = 0
PWM_MODE_BAL = 1
INT_EDGE_SETUP = 0
INT_EDGE_FALLING = 1
INT_EDGE_RISING = 2
INT_EDGE_BOTH = 3
LSBFIRST = 0
MSBFIRST = 1
MODE = 0
def __init__(self,pinmode=0):
print("Simulated GPIO class initialized")
def piBoardRev(self):
pass
def wpiPinToGpio(self,*args):
pass
def setPadDrive(self,*args):
pass
def getAlt(self,*args):
pass
def digitalWriteByte(self,*args):
pass
def pwmSetMode(self,*args):
pass
def pwmSetRange(self,*args):
pass
def pwmSetClock(self,*args):
pass
def gpioClockSet(self,*args):
pass
def pwmWrite(self,*args):
print("GPIO-PWM %d set to %d" %(args[0], args[1]))
def pinMode(self,*args):
pass
def digitalWrite(self,*args):
print("GPIO %d set to %d" % (args[0], args[1]))
def digitalRead(self,*args):
pass
def digitalWriteByte(self,*args):
pass
def analogWrite(self,*args):
pass
def analogRead(self,*args):
pass
def shiftOut(self,*args):
pass
def shiftIn(self,*args):
pass
def pullUpDnControl(self,*args):
pass
def waitForInterrupt(self,*args):
pass
def wiringPiISR(self,*args):
pass
def softPwmCreate(self,*args):
pass
def softPwmWrite(self,*args):
pass
def softToneCreate(self,*args):
pass
def softToneWrite(self,*args):
pass