summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liechti <cliechti@gmx.net>2016-09-06 22:20:09 +0200
committerChris Liechti <cliechti@gmx.net>2016-09-06 22:20:09 +0200
commit1153824b39cdf0e2be93744cda42eceb37967216 (patch)
treee4fba592e853cbe0b9d125d72ad049a365ea6d6a
parent012df5cdbcf0763a902a4c6ec4a7b20757b2d377 (diff)
downloadpyserial-git-1153824b39cdf0e2be93744cda42eceb37967216.tar.gz
docs: typo, serial.rs485 needs to be imported
fixes #159
-rw-r--r--documentation/pyserial_api.rst4
-rw-r--r--serial/serialposix.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/documentation/pyserial_api.rst b/documentation/pyserial_api.rst
index f7216e4..357852e 100644
--- a/documentation/pyserial_api.rst
+++ b/documentation/pyserial_api.rst
@@ -694,12 +694,14 @@ enable RS485 specific support on some platforms. Currently Windows and Linux
Usage::
+ import serial
+ import serial.rs485
ser = serial.Serial(...)
ser.rs485_mode = serial.rs485.RS485Settings(...)
ser.write(b'hello')
There is a subclass :class:`rs485.RS485` available to emulate the RS485 support
-on regular serial ports.
+on regular serial ports (``serial.rs485`` needs to be imported).
.. class:: rs485.RS485Settings
diff --git a/serial/serialposix.py b/serial/serialposix.py
index 23e19c4..78959ce 100644
--- a/serial/serialposix.py
+++ b/serial/serialposix.py
@@ -52,7 +52,7 @@ class PlatformSpecificBase(object):
# some systems support an extra flag to enable the two in POSIX unsupported
-# partiy settings for MARK and SPACE
+# paritiy settings for MARK and SPACE
CMSPAR = 0 # default, for unsupported platforms, override below
# try to detect the OS so that a device can be selected...