|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module containing stubs for API generation of the 'bitbangio' module. |
|
8 """ |
|
9 |
|
10 class I2C(): |
|
11 def __init__(self, scl, sda, *, frequency=400000, timeout): |
|
12 pass |
|
13 |
|
14 def deinit(self): |
|
15 pass |
|
16 |
|
17 def scan(self): |
|
18 pass |
|
19 |
|
20 def try_lock(self): |
|
21 pass |
|
22 |
|
23 def unlock(self): |
|
24 pass |
|
25 |
|
26 def readfrom_into(self, address, buffer, *, start=0, end=None): |
|
27 pass |
|
28 |
|
29 def writeto(self, address, buffer, *, start=0, end=None, stop=True): |
|
30 pass |
|
31 |
|
32 def writeto_then_readfrom(self, address, out_buffer, in_buffer, *, |
|
33 out_start=0, out_end=None, in_start=0, |
|
34 in_end=None): |
|
35 pass |
|
36 |
|
37 class OneWire(): |
|
38 def __init__(self, pin): |
|
39 pass |
|
40 |
|
41 def deinit(self): |
|
42 pass |
|
43 |
|
44 def reset(self): |
|
45 pass |
|
46 |
|
47 def read_bit(self): |
|
48 pass |
|
49 |
|
50 def write_bit(self, value): |
|
51 pass |
|
52 |
|
53 class SPI(): |
|
54 def __init__(self, clock, MOSI=None, MISO=None): |
|
55 pass |
|
56 |
|
57 def deinit(self): |
|
58 pass |
|
59 |
|
60 def configure(self, *, baudrate=100000, polarity=0, phase=0, bits=8): |
|
61 pass |
|
62 |
|
63 |
|
64 def try_lock(self): |
|
65 pass |
|
66 |
|
67 def unlock(self): |
|
68 pass |
|
69 |
|
70 def write(self, buf): |
|
71 pass |
|
72 |
|
73 def readinto(self, buf): |
|
74 pass |
|
75 |
|
76 def write_readinto(self, buffer_out, buffer_in, *, out_start=0, |
|
77 out_end=None, in_start=0, in_end=None): |
|
78 pass |