172 pass |
172 pass |
173 |
173 |
174 def rxcallback(self, fifo, fun): |
174 def rxcallback(self, fifo, fun): |
175 pass |
175 pass |
176 |
176 |
177 # TODO: complete this |
177 class DAC(): |
|
178 NORMAL = 0 |
|
179 CIRCULAR = 0 |
|
180 |
|
181 def __init__(self, port, bits=8, *, buffering=None): |
|
182 pass |
|
183 |
|
184 def init(self, bits=8, *, buffering=None): |
|
185 pass |
|
186 |
|
187 def deinit(self): |
|
188 pass |
|
189 |
|
190 def noise(self, freq): |
|
191 pass |
|
192 |
|
193 def triangle(self, freq): |
|
194 pass |
|
195 |
|
196 def write(self, value): |
|
197 pass |
|
198 |
|
199 def write_timed(self, data, freq, *, mode=NORMAL): |
|
200 pass |
|
201 |
|
202 class ExtInt(): |
|
203 IRQ_FALLING = 0 |
|
204 IRQ_RISING = 0 |
|
205 IRQ_RISING_FALLING = 0 |
|
206 |
|
207 def __init__(self, pin, mode, pull, callback): |
|
208 pass |
|
209 |
|
210 def disable(self): |
|
211 pass |
|
212 |
|
213 def enable(self): |
|
214 pass |
|
215 |
|
216 def line(self): |
|
217 pass |
|
218 |
|
219 def swint(self): |
|
220 pass |
|
221 |
|
222 @classmethod |
|
223 def regs(cls): |
|
224 pass |
|
225 |
|
226 class I2C(): |
|
227 MASTER = 0 |
|
228 SLAVE = 0 |
|
229 |
|
230 def __init__(self, bus, mode=None, *, addr=0x12, baudrate=400000, |
|
231 gencall=False, dma=False): |
|
232 pass |
|
233 |
|
234 def deinit(self): |
|
235 pass |
|
236 |
|
237 def init(self, mode, *, addr=0x12, baudrate=400000, gencall=False, |
|
238 dma=False): |
|
239 pass |
|
240 |
|
241 def is_ready(self, addr): |
|
242 pass |
|
243 |
|
244 def mem_read(self, data, addr, memaddr, *, timeout=5000, addr_size=8): |
|
245 pass |
|
246 |
|
247 def mem_write(self, data, addr, memaddr, *, timeout=5000, addr_size=8): |
|
248 pass |
|
249 |
|
250 def recv(self, recv, addr=0x00, *, timeout=5000): |
|
251 pass |
|
252 |
|
253 def send(self, send, addr=0x00, *, timeout=5000): |
|
254 pass |
|
255 |
|
256 def scan(self): |
|
257 pass |
|
258 |
|
259 class LCD(): |
|
260 def __init__(self, skin_position): |
|
261 pass |
|
262 |
|
263 def command(self, instr_data, buf): |
|
264 pass |
|
265 |
|
266 def contrast(self, value): |
|
267 pass |
|
268 |
|
269 def fill(self, colour): |
|
270 pass |
|
271 |
|
272 def get(self, x, y): |
|
273 pass |
|
274 |
|
275 def light(self, value): |
|
276 pass |
|
277 |
|
278 def pixel(self, x, y, colour): |
|
279 pass |
|
280 |
|
281 def show(self): |
|
282 pass |
|
283 |
|
284 def text(self, text, x, y, colour): |
|
285 pass |
|
286 |
|
287 def write(self, text): |
|
288 pass |
|
289 |
|
290 class LED(): |
|
291 def __init__(self, id): |
|
292 pass |
|
293 |
|
294 def intensity(self, value=None): |
|
295 pass |
|
296 |
|
297 def off(self): |
|
298 pass |
|
299 |
|
300 def on(self): |
|
301 pass |
|
302 |
|
303 def toggle(self): |
|
304 pass |
|
305 |
|
306 class Pin(): |
|
307 AF_OD = 0 |
|
308 AF_PP = 0 |
|
309 ANALOG = 0 |
|
310 IN = 0 |
|
311 OUT_OD = 0 |
|
312 OUT_PP = 0 |
|
313 PULL_DOWN = 0 |
|
314 PULL_NONE = 0 |
|
315 PULL_UP = 0 |
|
316 |
|
317 def __init__(self, id, mode, pull=PULL_NONE, af=-1): |
|
318 pass |
|
319 |
|
320 def init(self, mode, pull=PULL_NONE, af=-1): |
|
321 pass |
|
322 |
|
323 def value(self, value=None): |
|
324 pass |
|
325 |
|
326 def af(self): |
|
327 pass |
|
328 |
|
329 def af_list(self): |
|
330 pass |
|
331 |
|
332 def gpio(self): |
|
333 pass |
|
334 |
|
335 def mode(self): |
|
336 pass |
|
337 |
|
338 def name(self): |
|
339 pass |
|
340 |
|
341 def names(self): |
|
342 pass |
|
343 |
|
344 def pin(self): |
|
345 pass |
|
346 |
|
347 def port(self): |
|
348 pass |
|
349 |
|
350 def pull(self): |
|
351 pass |
|
352 |
|
353 @classmethod |
|
354 def debug(cls, state=None): |
|
355 pass |
|
356 |
|
357 @classmethod |
|
358 def dict(cls, dict=None): |
|
359 pass |
|
360 |
|
361 @classmethod |
|
362 def mapper(cls, fun=None): |
|
363 pass |
|
364 |
|
365 class RTC(): |
|
366 def __init__(self): |
|
367 pass |
|
368 |
|
369 def datetime(self, datetimetuple=None): |
|
370 pass |
|
371 |
|
372 def wakeup(self, timeout, callback=None): |
|
373 pass |
|
374 |
|
375 def info(self): |
|
376 pass |
|
377 |
|
378 def calibration(self, cal): |
|
379 pass |
|
380 |
|
381 class Servo(): |
|
382 def __init__(self, id): |
|
383 pass |
|
384 |
|
385 def angle(self, angle=None, time=0): |
|
386 pass |
|
387 |
|
388 def speed(self, speed=None, time=0): |
|
389 pass |
|
390 |
|
391 def pulse_width(self, value=None): |
|
392 pass |
|
393 |
|
394 def calibration(self, pulse_min=None, pulse_max=None, pulse_centre=None, |
|
395 pulse_angle_90=None, pulse_speed_100=None): |
|
396 pass |
|
397 |
|
398 class SPI(): |
|
399 MASTER = 0 |
|
400 SLAVE = 0 |
|
401 LSB = 0 |
|
402 MSB = 0 |
|
403 |
|
404 def __init__(self, bus, mode=None, baudrate=328125, *, prescaler, |
|
405 polarity=1, phase=0, bits=8, firstbit=MSB, ti=False, |
|
406 crc=None): |
|
407 pass |
|
408 |
|
409 def deinit(self): |
|
410 pass |
|
411 |
|
412 def init(self, mode, baudrate=328125, *, prescaler, polarity=1, phase=0, |
|
413 bits=8, firstbit=MSB, ti=False, crc=None): |
|
414 pass |
|
415 |
|
416 def recv(self, recv, *, timeout=5000): |
|
417 pass |
|
418 |
|
419 def send(self, send, *, timeout=5000): |
|
420 pass |
|
421 |
|
422 def send_recv(self, send, recv=None, *, timeout=5000): |
|
423 pass |
|
424 |
|
425 class Switch(): |
|
426 def __init__(self): |
|
427 pass |
|
428 |
|
429 def value(self): |
|
430 pass |
|
431 |
|
432 def callback(self, fun): |
|
433 pass |
|
434 |
|
435 class Timer(): |
|
436 PWM = 0 |
|
437 PWM_INVERTED = 0 |
|
438 OC_TIMING = 0 |
|
439 OC_ACTIVE = 0 |
|
440 OC_INACTIVE = 0 |
|
441 OC_TOGGLE = 0 |
|
442 OC_FORCED_ACTIVE = 0 |
|
443 OC_FORCED_INACTIVE = 0 |
|
444 IC = 0 |
|
445 ENC_A = 0 |
|
446 ENC_B = 0 |
|
447 ENC_AB = 0 |
|
448 HIGH = 0 |
|
449 LOW = 0 |
|
450 RISING = 0 |
|
451 FALLING = 0 |
|
452 BOTH = 0 |
|
453 |
|
454 def __init__(self, id, *, freq, prescaler, period): |
|
455 pass |
|
456 |
|
457 def init(self, *, freq, prescaler, period): |
|
458 pass |
|
459 |
|
460 def deinit(self): |
|
461 pass |
|
462 |
|
463 def callback(self, fun): |
|
464 pass |
|
465 |
|
466 def channel(self, channel, mode, **kwargs): |
|
467 pass |
|
468 |
|
469 def counter(self, value=None): |
|
470 pass |
|
471 |
|
472 def freq(self, value=None): |
|
473 pass |
|
474 |
|
475 def period(self, value=None): |
|
476 pass |
|
477 |
|
478 def prescaler(self, value=None): |
|
479 pass |
|
480 |
|
481 def source_freq(self): |
|
482 pass |
|
483 |
|
484 class TimerChannel(): |
|
485 def callback(self, fun): |
|
486 pass |
|
487 |
|
488 def capture(self, value=None): |
|
489 pass |
|
490 |
|
491 def compare(self, value=None): |
|
492 pass |
|
493 |
|
494 def pulse_width(self, value=None): |
|
495 pass |
|
496 |
|
497 def pulse_width_percent(self, value=None): |
|
498 pass |
|
499 |
|
500 class UART(): |
|
501 RTS = 0 |
|
502 CTS = 0 |
|
503 |
|
504 def __init__(self, bus, baudrate=None, bits=8, parity=None, stop=1, *, |
|
505 timeout=0, flow=0, timeout_char=0, read_buf_len=64): |
|
506 pass |
|
507 |
|
508 def init(self, baudrate, bits=8, parity=None, stop=1, *, timeout=0, flow=0, |
|
509 timeout_char=0, read_buf_len=64): |
|
510 pass |
|
511 |
|
512 def deinit(self): |
|
513 pass |
|
514 |
|
515 def any(self): |
|
516 pass |
|
517 |
|
518 def read(self, nbytes=None): |
|
519 pass |
|
520 |
|
521 def readchar(self): |
|
522 pass |
|
523 |
|
524 def readinto(self, buf, nbytes=None): |
|
525 pass |
|
526 |
|
527 def readline(self): |
|
528 pass |
|
529 |
|
530 def write(self, buf): |
|
531 pass |
|
532 |
|
533 def writechar(self, char): |
|
534 pass |
|
535 |
|
536 def sendbreak(self): |
|
537 pass |
|
538 |
|
539 class USB_HID(): |
|
540 def __init__(self): |
|
541 pass |
|
542 |
|
543 def recv(self, data, *, timeout=5000): |
|
544 pass |
|
545 |
|
546 def send(self, data): |
|
547 pass |
|
548 |
|
549 class USB_VCP(): |
|
550 def __init__(self): |
|
551 pass |
|
552 |
|
553 def setinterrupt(self, chr): |
|
554 pass |
|
555 |
|
556 def isconnected(self): |
|
557 pass |
|
558 |
|
559 def any(self): |
|
560 pass |
|
561 |
|
562 def close(self): |
|
563 pass |
|
564 |
|
565 def read(self, nbytes=None): |
|
566 pass |
|
567 |
|
568 def readinto(self, buf, maxlen=None): |
|
569 pass |
|
570 |
|
571 def readline(self): |
|
572 pass |
|
573 |
|
574 def readlines(self): |
|
575 pass |
|
576 |
|
577 def write(self, buf): |
|
578 pass |
|
579 |
|
580 def recv(self, data, *, timeout=5000): |
|
581 pass |
|
582 |
|
583 def send(self, data, *, timeout=5000): |
|
584 pass |