|
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 'i2cslave' module. |
|
8 """ |
|
9 |
|
10 class I2CSlave(): |
|
11 def __init__(self, scl, sda, addresses, smbus=False): |
|
12 pass |
|
13 |
|
14 def deinit(self): |
|
15 pass |
|
16 |
|
17 def request(self, timeout=-1): |
|
18 pass |
|
19 |
|
20 class I2CSlaveRequest(): |
|
21 address = 0 |
|
22 is_read = 0 |
|
23 is_restart = 0 |
|
24 |
|
25 def __init__(self, slave, address, is_read, is_restart): |
|
26 pass |
|
27 |
|
28 def read(self, n=-1, ack=True): |
|
29 pass |
|
30 |
|
31 def write(self, buffer): |
|
32 pass |
|
33 |
|
34 def ack(self, ack=True): |
|
35 pass |