/usr/lib/python3.6/site-packages/serial/__pycache__
NameSizeModeActions
aio.cpython-36.opt-1.pyc143310644editdlrm
aio.cpython-36.pyc145240644editdlrm
rfc2217.cpython-36.opt-1.pyc326440644editdlrm
rfc2217.cpython-36.pyc326440644editdlrm
rs485.cpython-36.opt-1.pyc27890644editdlrm
rs485.cpython-36.pyc27890644editdlrm
serialcli.cpython-36.opt-1.pyc66040644editdlrm
serialcli.cpython-36.pyc66040644editdlrm
serialjava.cpython-36.opt-1.pyc72530644editdlrm
serialjava.cpython-36.pyc72530644editdlrm
serialposix.cpython-36.opt-1.pyc191390644editdlrm
serialposix.cpython-36.pyc191710644editdlrm
serialutil.cpython-36.opt-1.pyc164230644editdlrm
serialutil.cpython-36.pyc164230644editdlrm
serialwin32.cpython-36.opt-1.pyc124020644editdlrm
serialwin32.cpython-36.pyc124020644editdlrm
win32.cpython-36.opt-1.pyc62940644editdlrm
win32.cpython-36.pyc62940644editdlrm
__init__.cpython-36.opt-1.pyc20520644editdlrm
__init__.cpython-36.pyc20520644editdlrm
Edit: /usr/lib/python3.6/site-packages/serial/__pycache__/rs485.cpython-36.pyc (2789B)
3 MÊ]WÁ ã@s:dZddlZddlZGdd„deƒZGdd„dejƒZdS)zµThe settings for RS485 are stored in a dedicated object that can be applied to serial ports (where supported). NOTE: Some implementations may only support a subset of the settings. éNc@seZdZddd„ZdS)Ú RS485SettingsTFNcCs"||_||_||_||_||_dS)N)Úrts_level_for_txÚrts_level_for_rxÚloopbackÚdelay_before_txÚdelay_before_rx)Úselfrrrrr©r ú/usr/lib/python3.6/rs485.pyÚ__init__s zRS485Settings.__init__)TFFNN)Ú__name__Ú __module__Ú __qualname__r r r r r rs rcsFeZdZdZ‡fdd„Z‡fdd„Zedd„ƒZejdd„ƒZ‡Z S) ÚRS485a5 A subclass that replaces the write method with one that toggles RTS according to the RS485 settings. NOTE: This may work unreliably on some serial ports (control signals not synchronized or delayed compared to data). Using delays may be unreliable (varying times, larger than expected) as the OS may not support very fine grained delays (no smaller than in the order of tens of milliseconds). NOTE: Some implementations support this natively. Better performance can be expected when the native version is used. NOTE: The loopback property is ignored by this implementation. The actual behavior depends on the used hardware. Usage: ser = RS485(...) ser.rs485_mode = RS485Settings(...) ser.write(b'hello') cstt|ƒj||Žd|_dS)N)Úsuperrr Ú_alternate_rs485_settings)rÚargsÚkwargs)Ú __class__r r r ;szRS485.__init__csŽ|jdk rz|j|jjƒ|jjdk r2tj|jjƒtt|ƒj|ƒtt|ƒj ƒ|jj dk rjtj|jj ƒ|j|jj ƒntt|ƒj|ƒdS)z=Write to port, controlling RTS before and after transmitting.N) rZsetRTSrrÚtimeZsleeprrÚwriteÚflushrr)rÚb)rr r r?s   z RS485.writecCs|jS)z˜ Enable RS485 mode and apply new settings, set to None to disable. See serial.rs485.RS485Settings for more info about the value. )r)rr r r Ú rs485_modeRszRS485.rs485_modecCs ||_dS)N)r)rZrs485_settingsr r r rZs) r r rÚ__doc__r rÚpropertyrÚsetterÚ __classcell__r r )rr r#s    r)rrÚserialÚobjectrZSerialrr r r r Ús