-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmachine.py
296 lines (213 loc) · 3.25 KB
/
machine.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
"""
Module: 'machine' on esp32 1.11.0
"""
# MCU: (sysname='esp32', nodename='esp32', release='1.11.0', version='v1.11-580-g973f68780 on 2019-11-17', machine='ESP32 module with ESP32')
# Stubber: 1.3.2
class ADC:
''
ATTN_0DB = 0
ATTN_11DB = 3
ATTN_2_5DB = 1
ATTN_6DB = 2
WIDTH_10BIT = 1
WIDTH_11BIT = 2
WIDTH_12BIT = 3
WIDTH_9BIT = 0
def atten():
pass
def read():
pass
def read_u16():
pass
def width():
pass
class DAC:
''
def write():
pass
DEEPSLEEP = 4
DEEPSLEEP_RESET = 4
EXT0_WAKE = 2
EXT1_WAKE = 3
HARD_RESET = 2
class I2C:
''
def init():
pass
def readfrom():
pass
def readfrom_into():
pass
def readfrom_mem():
pass
def readfrom_mem_into():
pass
def readinto():
pass
def scan():
pass
def start():
pass
def stop():
pass
def write():
pass
def writeto():
pass
def writeto_mem():
pass
def writevto():
pass
PIN_WAKE = 2
class PWM:
''
def deinit():
pass
def duty():
pass
def freq():
pass
def init():
pass
PWRON_RESET = 1
class Pin:
''
IN = 1
IRQ_FALLING = 2
IRQ_RISING = 1
OPEN_DRAIN = 7
OUT = 3
PULL_DOWN = 1
PULL_HOLD = 4
PULL_UP = 2
WAKE_HIGH = 5
WAKE_LOW = 4
def init():
pass
def irq():
pass
def off():
pass
def on():
pass
def value():
pass
class RTC:
''
def datetime():
pass
def init():
pass
def memory():
pass
class SDCard:
''
def deinit():
pass
def info():
pass
def ioctl():
pass
def readblocks():
pass
def writeblocks():
pass
SLEEP = 2
SOFT_RESET = 5
class SPI:
''
LSB = 1
MSB = 0
def deinit():
pass
def init():
pass
def read():
pass
def readinto():
pass
def write():
pass
def write_readinto():
pass
class Signal:
''
def off():
pass
def on():
pass
def value():
pass
TIMER_WAKE = 4
TOUCHPAD_WAKE = 5
class Timer:
''
ONE_SHOT = 0
PERIODIC = 1
def deinit():
pass
def init():
pass
def value():
pass
class TouchPad:
''
def config():
pass
def read():
pass
class UART:
''
INV_CTS = 1048576
INV_RTS = 8388608
INV_RX = 524288
INV_TX = 4194304
def any():
pass
def deinit():
pass
def init():
pass
def read():
pass
def readinto():
pass
def readline():
pass
def sendbreak():
pass
def write():
pass
ULP_WAKE = 6
class WDT:
''
def feed():
pass
WDT_RESET = 3
def deepsleep():
pass
def disable_irq():
pass
def enable_irq():
pass
def freq():
pass
def idle():
pass
def lightsleep():
pass
mem16 = None
mem32 = None
mem8 = None
def reset():
pass
def reset_cause():
pass
def sleep():
pass
def time_pulse_us():
pass
def unique_id():
pass
def wake_reason():
pass