MODSERIAL with support for more devices

Dependents:   1D-Pong BMT-K9_encoder BMT-K9-Regelaar programma_filter ... more

Check the cookbook page for more information: https://mbed.org/cookbook/MODSERIAL

Did you add a device? Please send a pull request so we can keep everything in one library instead of many copies. In that case also send a PM, since currently mbed does not inform of new pull requests. I will then also add you to the developers of this library so you can do other changes directly.

Files at this revision

API Documentation at this revision

Comitter:
AjK
Date:
Sun Nov 21 02:15:07 2010 +0000
Parent:
0:eb2522b41db8
Child:
2:b936b4acbd92
Commit message:
1.1

Changed in this revision

ChangeLog.c Show annotated file Show diff for this revision Revisions of this file
GETC.cpp Show annotated file Show diff for this revision Revisions of this file
MODSERIAL.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ChangeLog.c	Sun Nov 21 02:15:07 2010 +0000
@@ -0,0 +1,13 @@
+/* $Id:$
+    
+1.1 - 20/11/2010
+
+    * Added this file
+    * Removed cruft from GETC.cpp
+    * "teh" should be "the", why do my fingers do that?
+
+1.0 - 20/11/2010
+
+    * First release.
+
+*/
\ No newline at end of file
--- a/GETC.cpp	Sat Nov 20 16:54:05 2010 +0000
+++ b/GETC.cpp	Sun Nov 21 02:15:07 2010 +0000
@@ -25,8 +25,6 @@
 
 namespace AjK {
 
-int x = 0;
-
 int 
 MODSERIAL::__getc(bool block)
 {
--- a/MODSERIAL.h	Sat Nov 20 16:54:05 2010 +0000
+++ b/MODSERIAL.h	Sun Nov 21 02:15:07 2010 +0000
@@ -171,15 +171,15 @@
      *  
      * The Mbed standard <a href="/handbook/Serial">Serial</a> library object allows an interrupt callback
      * to be made when a byte is received by the TX or RX UART hardware. MODSERIAL traps these interrupts
-     * to enable it's buffering system. However, after the byte has been received/sent under interrupt caontrol, 
+     * to enable it's buffering system. However, after the byte has been received/sent under interrupt control, 
      * MODSERIAL can callback a user function as a notification of the interrupt. Note, user code should not
-     * directly interact with teh Uart hardware, MODSERIAL does that, instead, MODSERIAL API functions should
+     * directly interact with the Uart hardware, MODSERIAL does that, instead, MODSERIAL API functions should
      * be used.
      *
      * <b>Note</b>, a character is written out then, if there is room in the TX FIFO and the TX buffer is empty,
      * putc() will put the character directly into THR (the output holding register). If the TX FIFO is full and 
      * cannot accept the character, it is placed into the TX output buffer. The TX interrupts are then enabled
-     * so that when teh TX FIFO empties, the TX buffer is then transferred to the THR FIFO. The TxIrq will ONLY 
+     * so that when the TX FIFO empties, the TX buffer is then transferred to the THR FIFO. The TxIrq will ONLY 
      * be activated when this transfer of a character from BUFFER to THR FIFO takes place. If your character 
      * throughput is not high bandwidth, then the 16 byte TX FIFO may be enough and the TX output buffer may 
      * never come into play.
@@ -230,15 +230,15 @@
      *  
      * The Mbed standard <a href="/handbook/Serial">Serial</a> library object allows an interrupt callback
      * to be made when a byte is received by the TX or RX UART hardware. MODSERIAL traps these interrupts
-     * to enable it's buffering system. However, after the byte has been received/sent under interrupt caontrol, 
+     * to enable it's buffering system. However, after the byte has been received/sent under interrupt control, 
      * MODSERIAL can callback a user function as a notification of the interrupt. Note, user code should not
-     * directly interact with teh Uart hardware, MODSERIAL does that, instead, MODSERIAL API functions should
+     * directly interact with the Uart hardware, MODSERIAL does that, instead, MODSERIAL API functions should
      * be used.
      *
      * <b>Note</b>, a character is written out then, if there is room in the TX FIFO and the TX buffer is empty,
      * putc() will put the character directly into THR (the output holding register). If the TX FIFO is full and 
      * cannot accept the character, it is placed into the TX output buffer. The TX interrupts are then enabled
-     * so that when teh TX FIFO empties, the TX buffer is then transferred to the THR FIFO. The TxIrq will ONLY 
+     * so that when the TX FIFO empties, the TX buffer is then transferred to the THR FIFO. The TxIrq will ONLY 
      * be activated when this transfer of a character from BUFFER to THR FIFO takes place. If your character 
      * throughput is not high bandwidth, then the 16 byte TX FIFO may be enough and the TX output buffer may 
      * never come into play.
@@ -523,7 +523,7 @@
     /**
      * Function: txGetLastChar
      *
-     * Rteurn teh last byte to pass through the TX interrupt handler.
+     * Rteurn the last byte to pass through the TX interrupt handler.
      *
      * @ingroup MISC
      * @return The byte
@@ -543,7 +543,7 @@
     /**
      * Function: txIsBusy
      *
-     * If teh Uart is still actively sending characters this
+     * If the Uart is still actively sending characters this
      * function will return true.
      *
      * @ingroup API
@@ -614,7 +614,7 @@
     volatile char rxc;
     
     /**
-     * Pointers to teh TX and RX buffers.
+     * Pointers to the TX and RX buffers.
      * @ingroup INTERNALS
      */
     volatile char *buffer[2];
@@ -690,7 +690,7 @@
     /**
      * Put a character from the TX buffer
      * @ingroup INTERNALS
-     * @param bool True to block (wait for space in teh TX buffer if full)
+     * @param bool True to block (wait for space in the TX buffer if full)
      * @return 0 on success
      */
     int __putc(int c, bool);