RTS automatic toggle, for RS485 functionality.
Brought to you by:
cliechti
Hello,
I think this patch could be useful for anyone who wants to drive an RS232 to RS485 converter in a Win32 environment.
It solves the problem of setting and resetting the RTS signal at the right time.
Please note that this doesn't work on Win95, Win98SE and WinME, as indicated here: http://support.microsoft.com/kb/140030.
I have added the parameter rtsToggle.
Setting rtsToggle to True and rtscts to False, the RTS signal goes high before the transmission starts and it goes low after the last byte has been transmitted.
If rtscts is set to True, the rtsToggle setting will be overridden.
Patch partially accepted. As the feature is Windows specific and not portable to e.g. Posix and others, I do not want to change the arguments to __init__.
Functionality is implemented in serialwin32.py and can be activated using setRtsToggle() after the port has been created.
committed, will be in V2.6