-
Notifications
You must be signed in to change notification settings - Fork 147
Expand file tree
/
Copy pathi2c.pyi
More file actions
24 lines (20 loc) · 813 Bytes
/
i2c.pyi
File metadata and controls
24 lines (20 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from collections.abc import Sequence
from types import TracebackType
type MessageData = bytes | bytearray | list[int] | int
class I2CError(IOError): ...
class I2C:
class Message:
data: MessageData
read: bool
flags: int
def __init__(self, data: MessageData, read: bool = ..., flags: int = ...) -> None: ...
def __init__(self, devpath: str) -> None: ...
def __del__(self) -> None: ...
def __enter__(self) -> I2C: ... # noqa: Y034
def __exit__(self, t: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None) -> None: ...
def transfer(self, address: int, messages: Sequence[Message]) -> None: ...
def close(self) -> None: ...
@property
def fd(self) -> int: ...
@property
def devpath(self) -> str: ...