more documentation updates
diff --git a/documentation/appendix.rst b/documentation/appendix.rst
new file mode 100644
index 0000000..eaea2da
--- /dev/null
+++ b/documentation/appendix.rst
@@ -0,0 +1,68 @@
+==========
+ Appendix
+==========
+
+License
+=======
+
+Copyright (c) 2001-2008 Chris Liechti <cliechti@gmx.net>;
+All Rights Reserved.
+
+This is the Python license. In short, you can use this product in
+commercial and non-commercial applications, modify it, redistribute it.
+A notification to the author when you use and/or modify it is welcome.
+
+
+TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING THIS SOFTWARE
+-------------------------------------------------------------------
+
+LICENSE AGREEMENT
+~~~~~~~~~~~~~~~~~
+
+1. This LICENSE AGREEMENT is between the copyright holder of this
+product, and the Individual or Organization ("Licensee") accessing
+and otherwise using this product in source or binary form and its
+associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement,
+the copyright holder hereby grants Licensee a nonexclusive,
+royalty-free, world-wide license to reproduce, analyze, test,
+perform and/or display publicly, prepare derivative works, distribute,
+and otherwise use this product alone or in any derivative version,
+provided, however, that copyright holders License Agreement and
+copyright holders notice of copyright are retained in this product
+alone or in any derivative version prepared by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates this product or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to this product.
+
+4. The copyright holder is making this product available to Licensee on
+an "AS IS" basis. THE COPYRIGHT HOLDER MAKES NO REPRESENTATIONS OR
+WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION,
+THE COPYRIGHT HOLDER MAKES NO AND DISCLAIMS ANY REPRESENTATION OR
+WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR
+THAT THE USE OF THIS PRODUCT WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. THE COPYRIGHT HOLDER SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER
+USERS OF THIS PRODUCT FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL
+DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE
+USING THIS PRODUCT, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE
+POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any
+relationship of agency, partnership, or joint venture between the
+copyright holder and Licensee. This License Agreement does not grant
+permission to use trademarks or trade names from the copyright holder
+in a trademark sense to endorse or promote products or services of
+Licensee, or any third party.
+
+8. By copying, installing or otherwise using this product, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
+
diff --git a/documentation/index.rst b/documentation/index.rst
index 65a4c04..9c600e2 100644
--- a/documentation/index.rst
+++ b/documentation/index.rst
@@ -12,9 +12,7 @@
:maxdepth: 2
pyserial
- manual
shortintro
- .. ~ examples
pyserial_api
pyparallel
appendix
diff --git a/documentation/pyparallel.rst b/documentation/pyparallel.rst
index 3560bce..36611a9 100644
--- a/documentation/pyparallel.rst
+++ b/documentation/pyparallel.rst
@@ -59,6 +59,73 @@
find a simple terminal and more.
http://pyserial.svn.sourceforge.net/viewvc/pyserial/trunk/pyparallel/examples/
+API
+===
+
+.. module:: parallel
+
+.. class:: Parallel
+
+ .. method:: __init__(port)
+
+ Open given parallel port.
+
+ .. method:: setData(value)
+
+ Apply the given byte to the data pins of the parallel port.
+
+ .. method:: setDataStrobe(level)
+
+ Set the "data strobe" line to the given state.
+
+ .. method:: setAutoFeed(level)
+
+ Set "auto feed" line to given state.
+
+ .. method:: setInitOut(level)
+
+ Set "initialize" line to given state.
+
+ .. method: setSelect(level)
+
+ Set "select" line to given state.
+
+ .. method:getInError()
+
+ Set "Error" line to given state.
+
+ .. method:: getInSelected()
+
+ Read level of "select" line.
+
+ .. method:: getInPaperOut()
+
+ Read level of "paper out" line.
+
+ .. method:: getInAcknowledge()
+
+ Read level of "Acknowledge" line.
+
+ .. method: getInBusy()
+
+ Read level of "busy" line.
+
+.. module:: parallel.parallelutil
+
+.. class:: BitaccessMeta
+
+ This mix-in class adds a few properties that allow easier bit access to the
+ data lines. (D0 .. D7) e.g. p.D0 refers to the first bit of the data
+ lines.
+
+.. class:: VirtualParallelPort
+
+ This class provides a virtual parallel port implementation, useful
+ for tests and simulations without real hardware.
+
+
+Misc
+====
References
----------
* Python: http://www.python.org/|http://www.python.org
diff --git a/documentation/pyserial.rst b/documentation/pyserial.rst
new file mode 100644
index 0000000..258ef51
--- /dev/null
+++ b/documentation/pyserial.rst
@@ -0,0 +1,111 @@
+==========
+ pySerial
+==========
+
+Overview
+========
+This module encapsulates the access for the serial port. It provides backends
+for Python running on Windows, Linux, BSD (possibly any POSIX compliant
+system), Jython and IronPython (.NET and Mono). The module named "serial"
+automatically selects the appropriate backend.
+
+It is released under a free software license, see LICENSE.txt_ for more
+details.
+
+ (C) 2001-2009 Chris Liechti <cliechti@gmx.net>
+
+The `project page on SourceForge`_ and here is the `SVN repository`_ and the `Download Page`_.
+
+The homepage is at http://pyserial.sf.net.
+
+.. _LICENSE.txt: http://pyserial.svn.sourceforge.net/viewvc/*checkout*/pyserial/trunk/pyserial/LICENSE.txt
+.. _`project page on SourceForge`: http://sourceforge.net/projects/pyserial/
+.. _`SVN repository`: http://sourceforge.net/svn/?group_id=46487
+.. _`Download Page`: http://sourceforge.net/project/showfiles.php?group_id=46487
+
+
+Features
+========
+* same class based interface on all supported platforms
+* access to the port settings through Python 2.2+ properties
+* port numbering starts at zero, no need to know the port name in the user
+ program
+* port string (device name) can be specified if access through numbering is
+ inappropriate
+* support for different bytesizes, stopbits, parity and flow control with
+ RTS/CTS and/or Xon/Xoff
+* working with or without receive timeout
+* file like API with "read" and "write" ("readline" etc. also supported)
+* The files in this package are 100% pure Python. They depend on non standard
+ but common packages on Windows (pywin32) and Jython (JavaComm). POSIX (Linux,
+ BSD) uses only modules from the standard Python distribution)
+* The port is set up for binary transmission. No NULL byte stripping, CR-LF
+ translation etc. (which are many times enabled for POSIX.) This makes this
+ module universally useful.
+
+
+Requirements
+============
+* Python 2.2 or newer
+* pywin32 extensions on Windows
+* "Java Communications" (JavaComm) or compatible extension for Java/Jython
+
+Installation
+============
+
+pyserial
+--------
+This installs a package that can be used from python (``import serial``).
+
+The Python pywin32 library needs to be installed on windows.
+
+To install the module for all users on the system, administrator rights (root)
+is required..
+
+From source (tar.gz or checkout)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+http://pypi.python.org/pypi/pyserial
+Unpack the archive, enter the ``pyserial-x.y`` directory and run::
+
+ python setup.py install
+
+Setuptools/PyPI
+~~~~~~~~~~~~~~~
+Alternatively it can be installed from PyPy, either manually downloading the
+files and installing as described above or using::
+
+ easy_install -U pyserial
+
+Packages
+~~~~~~~~
+There are also packaged versions for some Linux distributions and Windows:
+
+Debian/Ubuntu
+ A package is availabe under the name "python-serial"
+
+Windows
+ There is also a Windows installer for end users. It is located in the
+ PyPi_. Developers may be interested to get the source archive, because it
+ contains examples and the readme.
+
+.. _PyPi: http://pypi.python.org/pypi/pyserial
+
+
+References
+==========
+* Python: http://www.python.org/|http://www.python.org
+* pywin32: http://sourceforge.net/projects/pywin32/ (previously known as win32all)
+* Jython: http://www.jython.org/|http://www.jython.org
+* Java@IBM http://www-106.ibm.com/developerworks/java/jdk/ (JavaComm links are on the download page for the respective platform jdk)
+* Java@SUN http://java.sun.com/products/
+* IronPython: http://www.codeplex.com/IronPython
+* setuptools: http://peak.telecommunity.com/DevCenter/setuptools
+
+
+Older Versions
+==============
+Older versions are still available on the `Download Page`_. pySerial 1.21 is
+compatible with Python 2.0 on Windows, Linux and several un*x like systems,
+MacOSX and Jython.
+
+.. _`Download Page`: http://sourceforge.net/project/showfiles.php?group_id=46487
diff --git a/documentation/shortintro.rst b/documentation/shortintro.rst
new file mode 100644
index 0000000..5e117ca
--- /dev/null
+++ b/documentation/shortintro.rst
@@ -0,0 +1,47 @@
+====================
+ Short introduction
+====================
+
+Open port 0 at "9600,8,N,1", no timeout::
+
+ >>> import serial
+ >>> ser = serial.Serial(0) # open first serial port
+ >>> print ser.portstr # check which port was really used
+ >>> ser.write("hello") # write a string
+ >>> ser.close() # close port
+
+Open named port at "19200,8,N,1", 1s timeout::
+
+ >>> ser = serial.Serial('/dev/ttyS1', 19200, timeout=1)
+ >>> x = ser.read() # read one byte
+ >>> s = ser.read(10) # read up to ten bytes (timeout)
+ >>> line = ser.readline() # read a '\n' terminated line
+ >>> ser.close()
+
+Open second port at "38400,8,E,1", non blocking HW handshaking::
+
+ >>> ser = serial.Serial(1, 38400, timeout=0,
+ ... parity=serial.PARITY_EVEN, rtscts=1)
+ >>> s = ser.read(100) # read up to one hundred bytes
+ ... # or as much is in the buffer
+
+Get a Serial instance and configure/open it later::
+
+ >>> ser = serial.Serial()
+ >>> ser.baudrate = 19200
+ >>> ser.port = 0
+ >>> ser
+ Serial<id=0xa81c10, open=False>(port='COM1', baudrate=19200, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=0, rtscts=0)
+ >>> ser.open()
+ >>> ser.isOpen()
+ True
+ >>> ser.close()
+ >>> ser.isOpen()
+ False
+
+Be carefully when using "readline". Do specify a timeout when opening the
+serial port otherwise it could block forever if no newline character is
+received. Also note that "readlines" only works with a timeout. "readlines"
+depends on having a timeout and interprets that as EOF (end of file). It raises
+an exception if the port is not opened correctly. Do also have a look at the
+example files in the examples directory in the source distribution or online.