summaryrefslogtreecommitdiff
path: root/pyserial/serial/serialwin32.py
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2003-10-05 12:28:13 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2003-10-05 12:28:13 +0000
commita30a8a052bf77ee8f8d07a7feea89dc5446fe48e (patch)
tree42c8d10c2e2c7c0d28ae5698d7f405d009d05b12 /pyserial/serial/serialwin32.py
parent4b6cfd5df915144a1227a302b862614fe337c4c8 (diff)
downloadpyserial-git-a30a8a052bf77ee8f8d07a7feea89dc5446fe48e.tar.gz
applied patches and feature requests
Diffstat (limited to 'pyserial/serial/serialwin32.py')
-rw-r--r--pyserial/serial/serialwin32.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pyserial/serial/serialwin32.py b/pyserial/serial/serialwin32.py
index ecbe2d7..35245a7 100644
--- a/pyserial/serial/serialwin32.py
+++ b/pyserial/serial/serialwin32.py
@@ -11,7 +11,7 @@ import win32event # We use events and the WaitFor[Single|Multiple]Objects functi
import win32con # constants.
from serialutil import *
-VERSION = "$Revision: 1.26 $".split()[1] #extract CVS version
+VERSION = "$Revision: 1.27 $".split()[1] #extract CVS version
#from winbase.h. these should realy be in win32con
MS_CTS_ON = 16
@@ -260,6 +260,16 @@ class Serial(SerialBase):
if not self.hComPort: raise portNotOpenError
return MS_RLSD_ON & win32file.GetCommModemStatus(self.hComPort) != 0
+ # - - platform specific - - - -
+
+ def setXON(self, level=True):
+ """Platform specific - set flow state."""
+ if not self.hComPort: raise portNotOpenError
+ if level:
+ win32file.EscapeCommFunction(self.hComPort, win32file.SETXON)
+ else:
+ win32file.EscapeCommFunction(self.hComPort, win32file.SETXOFF)
+
#Nur Testfunktion!!
if __name__ == '__main__':
print __name__