aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/usart.rst
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@mit.edu>2010-12-21 10:27:37 -0500
committerMarti Bolivar <mbolivar@mit.edu>2010-12-21 10:27:37 -0500
commitc45bccad44187da27505cf5808424e709e3f54a1 (patch)
tree18a459a50f8d0551ba046e30462c93999d982725 /docs/source/usart.rst
parent84fd2532a7f23d20354ff590790b3f892cb7e7d7 (diff)
parentd5ad2a27f4e69e6cc9324331945937c983c30366 (diff)
downloadlibrambutan-c45bccad44187da27505cf5808424e709e3f54a1.tar.gz
librambutan-c45bccad44187da27505cf5808424e709e3f54a1.zip
Merge branch 'master' into debug-serialusb.
Chose debug-serialusb version in cases of conflict. Conflicts: libmaple/usb/usb_callbacks.c
Diffstat (limited to 'docs/source/usart.rst')
-rw-r--r--docs/source/usart.rst81
1 files changed, 8 insertions, 73 deletions
diff --git a/docs/source/usart.rst b/docs/source/usart.rst
index 19b054f..3beb3fc 100644
--- a/docs/source/usart.rst
+++ b/docs/source/usart.rst
@@ -10,82 +10,18 @@
Hardware/Circuit Design
-----------------------
-The Maple has 3 separate USART devices: ``Serial1``, ``Serial2``, and
-``Serial3``. In the most simple use case, the RX and TX pins are used
-to send data at a predetermined baudrate with the line voltage level
-relative to ground.
-
-+-----------+--------+-----+
-|Port |Function|Pin |
-+===========+========+=====+
-|``Serial1``|TX |D7 |
-| | | |
-| |RX |D8 |
-| | | |
-| |CK |D6 |
-+-----------+--------+-----+
-|``Serial2``|TX |D1 |
-| | | |
-| |RX |D0 |
-| | | |
-| |CK |D10 |
-| | | |
-| |CTS |D2 |
-| | | |
-| |RTS |D3 |
-+-----------+--------+-----+
-|``Serial3``|TX |D29 |
-| | | |
-| |RX |D30 |
-| | | |
-| |CK |D31 |
-| | | |
-| |CTS |D32 |
-| | | |
-| |RTS |D33 |
-+-----------+--------+-----+
-
-.. TODO make above less ugly
+The Maple has 3 separate USART devices. In the most simple use case,
+the RX and TX pins are used to send data at a predetermined baudrate
+with the line voltage level relative to ground. Their usage is
+documented in the :ref:`Serial Ports <lang-serial>` language reference
+page.
Compatible Devices and Specifications
-------------------------------------
-We have successfully used the Maple USART ports with an FT232R-based USB-serial converter at up to 115200 baud; higher speeds should certainly be possible.
-
-Function Reference
-------------------
-
-In the following, you may replace ``SerialN`` with ``Serial1``,
-``Serial2``, or ``Serial3``.
-
-``SerialN.begin(baudrate)``
-
- ``SerialN.begin`` is usually called in `setup()`_ to configure the
- baudrate of the given serial port and to set up the header pins
- appropriately. It can be called at any time to reconfigure a port
- or to change the baudrate. 9600 baud is the generic speed most
- widely supported by other devices and terminals.
-
-``SerialN.print(...)``/\ ``SerialN.println(...)``
-
- Writes data into the port buffer to be transmitted as soon as
- possible. Accepts strings (``char*``). If a raw integer is
- passed, the corresponding ASCII character will be transmitted; to
- print out a number in human readable form add a second parameter
- with the base system.
-
- For example, to print out the decimal number '1234' use
- ``SerialN.print(1234, DEC)``; to print out the binary number
- '1001', use ``SerialN.print(9, BIN)``.
-
-``SerialN.available()``/\ ``SerialN.read()``
-
- ``SerialN.read()`` will return the next unread character that has
- been received over the port. ``SerialN.available()`` returns how
- many such bytes are available (or zero if none are). If none are
- available, ``SerialN.read()`` will block/fail, so the usual
- program structure is to poll with ``SerialN.available`` and only
- read if a nonzero value is returned.
+We have successfully used the Maple USART ports with an FT232R-based
+USB-serial converter at up to 115200 baud; higher speeds should
+certainly be possible.
Recommended Reading
-------------------
@@ -94,6 +30,5 @@ Recommended Reading
* `Arduino reference on Serial <http://arduino.cc/en/Reference/Serial>`_
* STMicro documentation for STM32F103RB microcontroller:
- * `All <http://www.st.com/mcu/devicedocs-STM32F103RB-110.html>`_
* `Datasheet <http://www.st.com/stonline/products/literature/ds/13587.pdf>`_ (pdf)
* `Reference Manual <http://www.st.com/stonline/products/literature/rm/13902.pdf>`_ (pdf)