Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Libs/MODSERIAL/ChangeLog.c@31:7eaa5e881b56, 2014-11-14 (annotated)
- Committer:
- pspatel321
- Date:
- Fri Nov 14 06:05:59 2014 +0000
- Revision:
- 31:7eaa5e881b56
Mostly working. Wrote CAN in/out code. Xbee still needs work. My guess is that MODDMA breaks when used with RTOS.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| pspatel321 | 31:7eaa5e881b56 | 1 | /* $Id:$ |
| pspatel321 | 31:7eaa5e881b56 | 2 | |
| pspatel321 | 31:7eaa5e881b56 | 3 | 1.25 8th January 2013 |
| pspatel321 | 31:7eaa5e881b56 | 4 | |
| pspatel321 | 31:7eaa5e881b56 | 5 | * Bring back into line with MBed libraries. |
| pspatel321 | 31:7eaa5e881b56 | 6 | * Credits: |
| pspatel321 | 31:7eaa5e881b56 | 7 | Erik Olieman : http://mbed.org/users/Sissors/code/MODSERIAL/rev/3ba4341d74d6 |
| pspatel321 | 31:7eaa5e881b56 | 8 | Erik Olieman : http://mbed.org/users/Sissors/code/MODSERIAL/rev/a469aa702bab |
| pspatel321 | 31:7eaa5e881b56 | 9 | |
| pspatel321 | 31:7eaa5e881b56 | 10 | |
| pspatel321 | 31:7eaa5e881b56 | 11 | 1.24 6th Dec 2012 |
| pspatel321 | 31:7eaa5e881b56 | 12 | |
| pspatel321 | 31:7eaa5e881b56 | 13 | * Beta release for new Mbed library. |
| pspatel321 | 31:7eaa5e881b56 | 14 | |
| pspatel321 | 31:7eaa5e881b56 | 15 | 1.23 25th July 2012 |
| pspatel321 | 31:7eaa5e881b56 | 16 | |
| pspatel321 | 31:7eaa5e881b56 | 17 | * LPC1768 code as was. This release includes "alpha" support for the LPC11U24 |
| pspatel321 | 31:7eaa5e881b56 | 18 | |
| pspatel321 | 31:7eaa5e881b56 | 19 | 1.22 19th April 2012 |
| pspatel321 | 31:7eaa5e881b56 | 20 | |
| pspatel321 | 31:7eaa5e881b56 | 21 | * http://mbed.org/forum/bugs-suggestions/topic/2936/ |
| pspatel321 | 31:7eaa5e881b56 | 22 | * Bug fix, protect important buffer pointers from IRQ corruption. |
| pspatel321 | 31:7eaa5e881b56 | 23 | * Credits: |
| pspatel321 | 31:7eaa5e881b56 | 24 | Anthony Wieser http://mbed.org/users/WieserSoftwareLtd/ for the fix. |
| pspatel321 | 31:7eaa5e881b56 | 25 | BlazeX http://mbed.org/users/BlazeX/ for the alert that a fix was needed! |
| pspatel321 | 31:7eaa5e881b56 | 26 | |
| pspatel321 | 31:7eaa5e881b56 | 27 | 1.21 10 May 2011 |
| pspatel321 | 31:7eaa5e881b56 | 28 | |
| pspatel321 | 31:7eaa5e881b56 | 29 | * http://mbed.org/forum/mbed/topic/2264 |
| pspatel321 | 31:7eaa5e881b56 | 30 | |
| pspatel321 | 31:7eaa5e881b56 | 31 | 1.20 26 April 2011 |
| pspatel321 | 31:7eaa5e881b56 | 32 | |
| pspatel321 | 31:7eaa5e881b56 | 33 | * Bug fix, not blocking on transmit |
| pspatel321 | 31:7eaa5e881b56 | 34 | by Erik Petrich, http://mbed.org/forum/bugs-suggestions/topic/2200 |
| pspatel321 | 31:7eaa5e881b56 | 35 | |
| pspatel321 | 31:7eaa5e881b56 | 36 | 1.19 20 April 2011 |
| pspatel321 | 31:7eaa5e881b56 | 37 | |
| pspatel321 | 31:7eaa5e881b56 | 38 | * Fixed some doxygen comment bugs. |
| pspatel321 | 31:7eaa5e881b56 | 39 | |
| pspatel321 | 31:7eaa5e881b56 | 40 | 1.18 20 April 2011 |
| pspatel321 | 31:7eaa5e881b56 | 41 | |
| pspatel321 | 31:7eaa5e881b56 | 42 | * All callbacks now use MODSERIAL_callback (rather than Mbed's FunctionPointer[1] type) |
| pspatel321 | 31:7eaa5e881b56 | 43 | to store and invoke it's callbacks. This allows MODSERIAL to pass a parameter |
| pspatel321 | 31:7eaa5e881b56 | 44 | to callbacks. The function prototype is now void func(MODSERIAL_IRQ_INFO *q). |
| pspatel321 | 31:7eaa5e881b56 | 45 | * Callbacks now pass a pointer to a MODSERIAL_IRQ_INFO class type. |
| pspatel321 | 31:7eaa5e881b56 | 46 | This class holds a pointer to the MODSERIAL object that invoked the callback |
| pspatel321 | 31:7eaa5e881b56 | 47 | thus freeing callbacks need to use the global variable of the original |
| pspatel321 | 31:7eaa5e881b56 | 48 | MODSERIAL instance. |
| pspatel321 | 31:7eaa5e881b56 | 49 | * MODSERIAL_IRQ_INFO also declares public functions that are protected within MODSERIAL |
| pspatel321 | 31:7eaa5e881b56 | 50 | thus allowing certain functions to be restricted to callback context only. |
| pspatel321 | 31:7eaa5e881b56 | 51 | * New function MODSERIAL_IRQ_INFO::rxDiscardLastChar() allows an rxCallback function |
| pspatel321 | 31:7eaa5e881b56 | 52 | to remove the character that was just placed into the RX buffer. |
| pspatel321 | 31:7eaa5e881b56 | 53 | |
| pspatel321 | 31:7eaa5e881b56 | 54 | [1] http://mbed.org/users/AjK/libraries/FPointer/latest/docs/ |
| pspatel321 | 31:7eaa5e881b56 | 55 | |
| pspatel321 | 31:7eaa5e881b56 | 56 | 1.17 08/Mar/2011 |
| pspatel321 | 31:7eaa5e881b56 | 57 | Fixed a memory leak in the DMA code. |
| pspatel321 | 31:7eaa5e881b56 | 58 | |
| pspatel321 | 31:7eaa5e881b56 | 59 | 1.16 - 12 Feb 2011 |
| pspatel321 | 31:7eaa5e881b56 | 60 | |
| pspatel321 | 31:7eaa5e881b56 | 61 | * Missed one, doh! |
| pspatel321 | 31:7eaa5e881b56 | 62 | |
| pspatel321 | 31:7eaa5e881b56 | 63 | 1.15 - 12 Feb 2011 |
| pspatel321 | 31:7eaa5e881b56 | 64 | |
| pspatel321 | 31:7eaa5e881b56 | 65 | * Fixed some typos. |
| pspatel321 | 31:7eaa5e881b56 | 66 | |
| pspatel321 | 31:7eaa5e881b56 | 67 | 1.14 - 7 Feb 2011 |
| pspatel321 | 31:7eaa5e881b56 | 68 | |
| pspatel321 | 31:7eaa5e881b56 | 69 | * Fixed a bug in __putc() that caused the output buffer pointer to |
| pspatel321 | 31:7eaa5e881b56 | 70 | become corrupted. |
| pspatel321 | 31:7eaa5e881b56 | 71 | |
| pspatel321 | 31:7eaa5e881b56 | 72 | 1.13 - 20/01/2011 |
| pspatel321 | 31:7eaa5e881b56 | 73 | |
| pspatel321 | 31:7eaa5e881b56 | 74 | * Added extra documentation. |
| pspatel321 | 31:7eaa5e881b56 | 75 | * Fixed some typos. |
| pspatel321 | 31:7eaa5e881b56 | 76 | |
| pspatel321 | 31:7eaa5e881b56 | 77 | 1.12 - 20/01/2011 |
| pspatel321 | 31:7eaa5e881b56 | 78 | |
| pspatel321 | 31:7eaa5e881b56 | 79 | * Added new "autoDetectChar()" function. To use:- |
| pspatel321 | 31:7eaa5e881b56 | 80 | 1st: Add a callback to invoke when the char is detected:- |
| pspatel321 | 31:7eaa5e881b56 | 81 | .attach(&detectedChar, MODSERIAL::RxAutoDetect); |
| pspatel321 | 31:7eaa5e881b56 | 82 | 2nd: Send the char to detect. |
| pspatel321 | 31:7eaa5e881b56 | 83 | .autoDectectChar('\n'); |
| pspatel321 | 31:7eaa5e881b56 | 84 | Whenever that char goes into the RX buffer your callback will be invoked. |
| pspatel321 | 31:7eaa5e881b56 | 85 | Added example2.cpp to demo a simple messaging system using this auto feature. |
| pspatel321 | 31:7eaa5e881b56 | 86 | |
| pspatel321 | 31:7eaa5e881b56 | 87 | |
| pspatel321 | 31:7eaa5e881b56 | 88 | 1.11 - 23/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 89 | |
| pspatel321 | 31:7eaa5e881b56 | 90 | * Fixed a minor issue with 1.10 missed an alteration of name change. |
| pspatel321 | 31:7eaa5e881b56 | 91 | |
| pspatel321 | 31:7eaa5e881b56 | 92 | 1.10 - 23/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 93 | |
| pspatel321 | 31:7eaa5e881b56 | 94 | * Rename the DMA callback from attach_dma_complete() to attach_dmaSendComplete() |
| pspatel321 | 31:7eaa5e881b56 | 95 | |
| pspatel321 | 31:7eaa5e881b56 | 96 | 1.9 - 23/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 97 | |
| pspatel321 | 31:7eaa5e881b56 | 98 | * Added support for DMA sending of characters. Required is |
| pspatel321 | 31:7eaa5e881b56 | 99 | the MODDMA library module:- |
| pspatel321 | 31:7eaa5e881b56 | 100 | http://mbed.org/users/AjK/libraries/MODDMA/latest |
| pspatel321 | 31:7eaa5e881b56 | 101 | See example_dma.cpp for more information. |
| pspatel321 | 31:7eaa5e881b56 | 102 | |
| pspatel321 | 31:7eaa5e881b56 | 103 | 1.8 - 22/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 104 | |
| pspatel321 | 31:7eaa5e881b56 | 105 | * Added code so that if a buffer is set to zero length then |
| pspatel321 | 31:7eaa5e881b56 | 106 | MODSERIAL defaults to just using the FIFO for that stream |
| pspatel321 | 31:7eaa5e881b56 | 107 | thus making the library "fall back" to teh same operation |
| pspatel321 | 31:7eaa5e881b56 | 108 | that the Mbed Serial library performs. |
| pspatel321 | 31:7eaa5e881b56 | 109 | * Removed dmaSend() function that should have been removed |
| pspatel321 | 31:7eaa5e881b56 | 110 | at 1.7 |
| pspatel321 | 31:7eaa5e881b56 | 111 | |
| pspatel321 | 31:7eaa5e881b56 | 112 | 1.7 - 21/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 113 | |
| pspatel321 | 31:7eaa5e881b56 | 114 | * Remove the DMA enum from MODSERIAL.h as it's not currently |
| pspatel321 | 31:7eaa5e881b56 | 115 | ready for release. |
| pspatel321 | 31:7eaa5e881b56 | 116 | * Added page doxygen comments. |
| pspatel321 | 31:7eaa5e881b56 | 117 | |
| pspatel321 | 31:7eaa5e881b56 | 118 | 1.6 - 21/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 119 | |
| pspatel321 | 31:7eaa5e881b56 | 120 | * Version 1.5 solved a blocking problem on putc() when called |
| pspatel321 | 31:7eaa5e881b56 | 121 | from another ISR. However, isr_tx() invokes a callback of it's |
| pspatel321 | 31:7eaa5e881b56 | 122 | own when a byte is tranferred from TX buffer to TX FIFO. User |
| pspatel321 | 31:7eaa5e881b56 | 123 | programs may interpret that as an IRQ callback. That's an ISR |
| pspatel321 | 31:7eaa5e881b56 | 124 | call from within an existing ISR which is not good. So the |
| pspatel321 | 31:7eaa5e881b56 | 125 | TxIrq callback from isr_tx is now conditional. It will only |
| pspatel321 | 31:7eaa5e881b56 | 126 | be called when isr_tx() is actually within it's own ISR and |
| pspatel321 | 31:7eaa5e881b56 | 127 | not when called from alternate ISR handlers. |
| pspatel321 | 31:7eaa5e881b56 | 128 | |
| pspatel321 | 31:7eaa5e881b56 | 129 | 1.5 - 21/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 130 | |
| pspatel321 | 31:7eaa5e881b56 | 131 | * Calling putc() (or any derived function that uses it like |
| pspatel321 | 31:7eaa5e881b56 | 132 | printf()) while inside an interrupt service routine can |
| pspatel321 | 31:7eaa5e881b56 | 133 | cause the system to lock up if the TX buffer is full. This |
| pspatel321 | 31:7eaa5e881b56 | 134 | is because bytes are only transferred from the TX buffer to |
| pspatel321 | 31:7eaa5e881b56 | 135 | the TX FIFO via the TX ISR. If we are, say in an RX ISR already, |
| pspatel321 | 31:7eaa5e881b56 | 136 | then the TX ISR will never trigger. The TX buffer stays full and |
| pspatel321 | 31:7eaa5e881b56 | 137 | there is never space to putc() the byte. So, while putc() blocks |
| pspatel321 | 31:7eaa5e881b56 | 138 | waiting for space it calls isr_tx() to ensure if TX FIFO space |
| pspatel321 | 31:7eaa5e881b56 | 139 | becomes available it will move bytes from the TX buffer to TX |
| pspatel321 | 31:7eaa5e881b56 | 140 | FIFO thus removing the blocking condition within putc(). |
| pspatel321 | 31:7eaa5e881b56 | 141 | |
| pspatel321 | 31:7eaa5e881b56 | 142 | 1.4 - 21/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 143 | |
| pspatel321 | 31:7eaa5e881b56 | 144 | * Removed all the new DMA code. I wish mbed.org had proper SVN |
| pspatel321 | 31:7eaa5e881b56 | 145 | versioning, I'm use to working in HEAD and BRANCHES after I've |
| pspatel321 | 31:7eaa5e881b56 | 146 | released a project. Getting bug reports in current releases |
| pspatel321 | 31:7eaa5e881b56 | 147 | while trying to dev new code is hard to manage without source |
| pspatel321 | 31:7eaa5e881b56 | 148 | control of some type! |
| pspatel321 | 31:7eaa5e881b56 | 149 | |
| pspatel321 | 31:7eaa5e881b56 | 150 | 1.3 - 21/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 151 | |
| pspatel321 | 31:7eaa5e881b56 | 152 | * Fixed a macro problem with txIsBusy() |
| pspatel321 | 31:7eaa5e881b56 | 153 | * Started adding code to use "block data" sending using DMA |
| pspatel321 | 31:7eaa5e881b56 | 154 | * Removed #include "IOMACROS.h" |
| pspatel321 | 31:7eaa5e881b56 | 155 | |
| pspatel321 | 31:7eaa5e881b56 | 156 | 1.2 - 21/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 157 | |
| pspatel321 | 31:7eaa5e881b56 | 158 | * Removed unsed variables from flushBuffer() |
| pspatel321 | 31:7eaa5e881b56 | 159 | * Fixed a bug where both RX AND TX fifos are cleared/reset |
| pspatel321 | 31:7eaa5e881b56 | 160 | when just TX OR RX should be cleared. |
| pspatel321 | 31:7eaa5e881b56 | 161 | * Fixed a bug that cleared IIR when in fact it should be left |
| pspatel321 | 31:7eaa5e881b56 | 162 | alone so that any pending interrupt after flush is handled. |
| pspatel321 | 31:7eaa5e881b56 | 163 | * Merged setBase() into init() as it wasn't required anywhere else. |
| pspatel321 | 31:7eaa5e881b56 | 164 | * Changed init() to enforce _uidx is set by Serial to define the _base |
| pspatel321 | 31:7eaa5e881b56 | 165 | address of the Uart in use. |
| pspatel321 | 31:7eaa5e881b56 | 166 | |
| pspatel321 | 31:7eaa5e881b56 | 167 | 1.1 - 20/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 168 | |
| pspatel321 | 31:7eaa5e881b56 | 169 | * Added this file |
| pspatel321 | 31:7eaa5e881b56 | 170 | * Removed cruft from GETC.cpp |
| pspatel321 | 31:7eaa5e881b56 | 171 | * "teh" should be "the", why do my fingers do that? |
| pspatel321 | 31:7eaa5e881b56 | 172 | |
| pspatel321 | 31:7eaa5e881b56 | 173 | 1.0 - 20/11/2010 |
| pspatel321 | 31:7eaa5e881b56 | 174 | |
| pspatel321 | 31:7eaa5e881b56 | 175 | * First release. |
| pspatel321 | 31:7eaa5e881b56 | 176 | |
| pspatel321 | 31:7eaa5e881b56 | 177 | */ |
