From f3d4831a8a0e3265e7db1522c666caca25061956 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Tue, 17 Jan 2023 09:48:43 -0500 Subject: [PATCH] Implement `get_protocol` and `set_protocol` --- serial_asyncio/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/serial_asyncio/__init__.py b/serial_asyncio/__init__.py index e173b56..141b89b 100644 --- a/serial_asyncio/__init__.py +++ b/serial_asyncio/__init__.py @@ -193,6 +193,14 @@ def abort(self): """ self._abort(None) + def get_protocol(self): + """Return the current protocol.""" + return self._protocol + + def set_protocol(self, protocol): + """Set a new protocol.""". + self._protocol = protocol + def flush(self): """ clears output buffer and stops any more data being written """