summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaelan Mikowicz <eternity01033@gmail.com>2018-07-16 11:15:30 -0700
committerKaelan Mikowicz <eternity01033@gmail.com>2018-07-16 11:15:30 -0700
commitd82d0e192e4759a397653cbed284abc679be619a (patch)
treeb1838a83161a5ce21959a7dc982c7b5227e191d4
parentfca918defddae5ecd1dc48dba0894717e33f8903 (diff)
downloadpyserial-git-d82d0e192e4759a397653cbed284abc679be619a.tar.gz
move _update_break_state to platform specific base
-rw-r--r--serial/serialposix.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/serial/serialposix.py b/serial/serialposix.py
index cea104c..334ba9f 100644
--- a/serial/serialposix.py
+++ b/serial/serialposix.py
@@ -53,6 +53,15 @@ class PlatformSpecificBase(object):
def set_low_latency_mode(self, low_latency_settings):
raise NotImplementedError('Low latency not supported on this platform')
+
+ def _update_break_state(self):
+ """\
+ Set break: Controls TXD. When active, no transmitting is possible.
+ """
+ if self._break_state:
+ fcntl.ioctl(self.fd, TIOCSBRK)
+ else:
+ fcntl.ioctl(self.fd, TIOCCBRK)
# some systems support an extra flag to enable the two in POSIX unsupported
@@ -660,15 +669,6 @@ class Serial(SerialBase, PlatformSpecific):
raise portNotOpenError
termios.tcsendbreak(self.fd, int(duration / 0.25))
- def _update_break_state(self):
- """\
- Set break: Controls TXD. When active, no transmitting is possible.
- """
- if self._break_state:
- fcntl.ioctl(self.fd, TIOCSBRK)
- else:
- fcntl.ioctl(self.fd, TIOCCBRK)
-
def _update_rts_state(self):
"""Set terminal status line: Request To Send"""
if self._rts_state: