|
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 'busio' module. |
|
8 """ |
|
9 |
|
10 class I2C(): |
|
11 def __init__(self, scl, sda, *, frequency=400000): |
|
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 class OneWire(): |
|
33 def __init__(self, pin): |
|
34 pass |
|
35 |
|
36 def deinit(self): |
|
37 pass |
|
38 |
|
39 def reset(self): |
|
40 pass |
|
41 |
|
42 def read_bit(self): |
|
43 pass |
|
44 |
|
45 def write_bit(self, value): |
|
46 pass |
|
47 |
|
48 class SPI(): |
|
49 def __init__(self, clock, MOSI=None, MISO=None): |
|
50 pass |
|
51 |
|
52 def deinit(self): |
|
53 pass |
|
54 |
|
55 def configure(self, *, baudrate=100000, polarity=0, phase=0, bits=8): |
|
56 pass |
|
57 |
|
58 |
|
59 def try_lock(self): |
|
60 pass |
|
61 |
|
62 def unlock(self): |
|
63 pass |
|
64 |
|
65 def write(self, buffer, *, start=0, end=None): |
|
66 pass |
|
67 |
|
68 def readinto(self, buffer, *, start=0, end=None, write_value=0): |
|
69 pass |
|
70 |
|
71 def write_readinto(self, buffer_out, buffer_in, *, out_start=0, |
|
72 out_end=None, in_start=0, in_end=None): |
|
73 pass |
|
74 |
|
75 @property |
|
76 def frequency(self): |
|
77 pass |
|
78 |
|
79 class UART(): |
|
80 def __init__(self, x, rx, *, baudrate=9600, bits=8, parity=None, stop=1, |
|
81 timeout=1, receiver_buffer_size=64): |
|
82 pass |
|
83 |
|
84 def deinit(self): |
|
85 pass |
|
86 |
|
87 def read(self, nbytes=None): |
|
88 pass |
|
89 |
|
90 def readinto(self, buf): |
|
91 pass |
|
92 |
|
93 def readline(self): |
|
94 pass |
|
95 |
|
96 def write(self, buf): |
|
97 pass |
|
98 |
|
99 @property |
|
100 def baudrate(self): |
|
101 pass |
|
102 |
|
103 @property |
|
104 def in_waiting(self): |
|
105 pass |
|
106 |
|
107 def reset_input_buffer(self): |
|
108 pass |