From a8049bb66f7bc62c9a33488615d0990e0a920520 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Feb 2022 09:53:28 +0100 Subject: build: add utility scripts --- typings/serial/serialutil.pyi | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 typings/serial/serialutil.pyi (limited to 'typings/serial/serialutil.pyi') diff --git a/typings/serial/serialutil.pyi b/typings/serial/serialutil.pyi new file mode 100644 index 0000000..d24f7d1 --- /dev/null +++ b/typings/serial/serialutil.pyi @@ -0,0 +1,37 @@ +import io +from typing import Any, Optional + + +class SerialBase(io.RawIOBase): + """\ + Serial port base class. Provides __init__ function and properties to + get/set port settings. + """ + + def __init__( + self, + port: Optional[str] = ..., + baudrate: Optional[int] = ..., + **kwargs: Any + ) -> None: + """Initialize comm port object. If a "port" is given, then the port + will be opened immediately. Otherwise a Serial port object in closed + state is returned. + """ + ... + + @property + def baudrate(self) -> int: ... + + @baudrate.setter + def baudrate(self) -> None: ... + + def setRTS(self, value: Optional[bool] = ...) -> None: + ... + + def setDTR(self, value: Optional[bool] = ...) -> None: + ... + + @property + def is_open(self) -> bool: + ... -- cgit v1.2.3-18-g5258