diff options
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: |