diff options
author | Kaelan Mikowicz <eternity01033@gmail.com> | 2018-07-16 11:15:30 -0700 |
---|---|---|
committer | Kaelan Mikowicz <eternity01033@gmail.com> | 2018-07-16 11:15:30 -0700 |
commit | d82d0e192e4759a397653cbed284abc679be619a (patch) | |
tree | b1838a83161a5ce21959a7dc982c7b5227e191d4 /serial/serialposix.py | |
parent | fca918defddae5ecd1dc48dba0894717e33f8903 (diff) | |
download | pyserial-git-d82d0e192e4759a397653cbed284abc679be619a.tar.gz |
move _update_break_state to platform specific base
Diffstat (limited to 'serial/serialposix.py')
-rw-r--r-- | serial/serialposix.py | 18 |
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: |