summaryrefslogtreecommitdiff
path: root/typings/serial/serialutil.pyi
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-02-14 09:53:28 +0100
committerHampusM <hampus@hampusmat.com>2022-02-14 10:05:53 +0100
commita8049bb66f7bc62c9a33488615d0990e0a920520 (patch)
tree1372e18896897490650203efe72c8244a23204cf /typings/serial/serialutil.pyi
parent336d968dd2a4473b3acd71cfef86ad47a7901fbc (diff)
build: add utility scripts
Diffstat (limited to 'typings/serial/serialutil.pyi')
-rw-r--r--typings/serial/serialutil.pyi37
1 files changed, 37 insertions, 0 deletions
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:
+ ...