MODSERIAL with support for KL25Z + RTOS (beta, putc + puts currently)
Fork of MODSERIAL by
ChangeLog.c
00001 /* $Id:$ 00002 1.29 12th July 2013 00003 * Added KL25Z support + split code in device dependent and independent part 00004 00005 1.26 10th June 2013 00006 * _uidx reference in DMA code replaced by _serial.index 00007 00008 1.25 8th January 2013 00009 00010 * Bring back into line with MBed libraries. 00011 * Credits: 00012 Erik Olieman : http://mbed.org/users/Sissors/code/MODSERIAL/rev/3ba4341d74d6 00013 Erik Olieman : http://mbed.org/users/Sissors/code/MODSERIAL/rev/a469aa702bab 00014 00015 00016 1.24 6th Dec 2012 00017 00018 * Beta release for new Mbed library. 00019 00020 1.23 25th July 2012 00021 00022 * LPC1768 code as was. This release includes "alpha" support for the LPC11U24 00023 00024 1.22 19th April 2012 00025 00026 * http://mbed.org/forum/bugs-suggestions/topic/2936/ 00027 * Bug fix, protect important buffer pointers from IRQ corruption. 00028 * Credits: 00029 Anthony Wieser http://mbed.org/users/WieserSoftwareLtd/ for the fix. 00030 BlazeX http://mbed.org/users/BlazeX/ for the alert that a fix was needed! 00031 00032 1.21 10 May 2011 00033 00034 * http://mbed.org/forum/mbed/topic/2264 00035 00036 1.20 26 April 2011 00037 00038 * Bug fix, not blocking on transmit 00039 by Erik Petrich, http://mbed.org/forum/bugs-suggestions/topic/2200 00040 00041 1.19 20 April 2011 00042 00043 * Fixed some doxygen comment bugs. 00044 00045 1.18 20 April 2011 00046 00047 * All callbacks now use MODSERIAL_callback (rather than Mbed's FunctionPointer[1] type) 00048 to store and invoke it's callbacks. This allows MODSERIAL to pass a parameter 00049 to callbacks. The function prototype is now void func(MODSERIAL_IRQ_INFO *q). 00050 * Callbacks now pass a pointer to a MODSERIAL_IRQ_INFO class type. 00051 This class holds a pointer to the MODSERIAL object that invoked the callback 00052 thus freeing callbacks need to use the global variable of the original 00053 MODSERIAL instance. 00054 * MODSERIAL_IRQ_INFO also declares public functions that are protected within MODSERIAL 00055 thus allowing certain functions to be restricted to callback context only. 00056 * New function MODSERIAL_IRQ_INFO::rxDiscardLastChar() allows an rxCallback function 00057 to remove the character that was just placed into the RX buffer. 00058 00059 [1] http://mbed.org/users/AjK/libraries/FPointer/latest/docs/ 00060 00061 1.17 08/Mar/2011 00062 Fixed a memory leak in the DMA code. 00063 00064 1.16 - 12 Feb 2011 00065 00066 * Missed one, doh! 00067 00068 1.15 - 12 Feb 2011 00069 00070 * Fixed some typos. 00071 00072 1.14 - 7 Feb 2011 00073 00074 * Fixed a bug in __putc() that caused the output buffer pointer to 00075 become corrupted. 00076 00077 1.13 - 20/01/2011 00078 00079 * Added extra documentation. 00080 * Fixed some typos. 00081 00082 1.12 - 20/01/2011 00083 00084 * Added new "autoDetectChar()" function. To use:- 00085 1st: Add a callback to invoke when the char is detected:- 00086 .attach(&detectedChar, MODSERIAL::RxAutoDetect); 00087 2nd: Send the char to detect. 00088 .autoDectectChar('\n'); 00089 Whenever that char goes into the RX buffer your callback will be invoked. 00090 Added example2.cpp to demo a simple messaging system using this auto feature. 00091 00092 00093 1.11 - 23/11/2010 00094 00095 * Fixed a minor issue with 1.10 missed an alteration of name change. 00096 00097 1.10 - 23/11/2010 00098 00099 * Rename the DMA callback from attach_dma_complete() to attach_dmaSendComplete() 00100 00101 1.9 - 23/11/2010 00102 00103 * Added support for DMA sending of characters. Required is 00104 the MODDMA library module:- 00105 http://mbed.org/users/AjK/libraries/MODDMA/latest 00106 See example_dma.cpp for more information. 00107 00108 1.8 - 22/11/2010 00109 00110 * Added code so that if a buffer is set to zero length then 00111 MODSERIAL defaults to just using the FIFO for that stream 00112 thus making the library "fall back" to teh same operation 00113 that the Mbed Serial library performs. 00114 * Removed dmaSend() function that should have been removed 00115 at 1.7 00116 00117 1.7 - 21/11/2010 00118 00119 * Remove the DMA enum from MODSERIAL.h as it's not currently 00120 ready for release. 00121 * Added page doxygen comments. 00122 00123 1.6 - 21/11/2010 00124 00125 * Version 1.5 solved a blocking problem on putc() when called 00126 from another ISR. However, isr_tx() invokes a callback of it's 00127 own when a byte is tranferred from TX buffer to TX FIFO. User 00128 programs may interpret that as an IRQ callback. That's an ISR 00129 call from within an existing ISR which is not good. So the 00130 TxIrq callback from isr_tx is now conditional. It will only 00131 be called when isr_tx() is actually within it's own ISR and 00132 not when called from alternate ISR handlers. 00133 00134 1.5 - 21/11/2010 00135 00136 * Calling putc() (or any derived function that uses it like 00137 printf()) while inside an interrupt service routine can 00138 cause the system to lock up if the TX buffer is full. This 00139 is because bytes are only transferred from the TX buffer to 00140 the TX FIFO via the TX ISR. If we are, say in an RX ISR already, 00141 then the TX ISR will never trigger. The TX buffer stays full and 00142 there is never space to putc() the byte. So, while putc() blocks 00143 waiting for space it calls isr_tx() to ensure if TX FIFO space 00144 becomes available it will move bytes from the TX buffer to TX 00145 FIFO thus removing the blocking condition within putc(). 00146 00147 1.4 - 21/11/2010 00148 00149 * Removed all the new DMA code. I wish mbed.org had proper SVN 00150 versioning, I'm use to working in HEAD and BRANCHES after I've 00151 released a project. Getting bug reports in current releases 00152 while trying to dev new code is hard to manage without source 00153 control of some type! 00154 00155 1.3 - 21/11/2010 00156 00157 * Fixed a macro problem with txIsBusy() 00158 * Started adding code to use "block data" sending using DMA 00159 * Removed #include "IOMACROS.h" 00160 00161 1.2 - 21/11/2010 00162 00163 * Removed unsed variables from flushBuffer() 00164 * Fixed a bug where both RX AND TX fifos are cleared/reset 00165 when just TX OR RX should be cleared. 00166 * Fixed a bug that cleared IIR when in fact it should be left 00167 alone so that any pending interrupt after flush is handled. 00168 * Merged setBase() into init() as it wasn't required anywhere else. 00169 * Changed init() to enforce _uidx is set by Serial to define the _base 00170 address of the Uart in use. 00171 00172 1.1 - 20/11/2010 00173 00174 * Added this file 00175 * Removed cruft from GETC.cpp 00176 * "teh" should be "the", why do my fingers do that? 00177 00178 1.0 - 20/11/2010 00179 00180 * First release. 00181 00182 */
Generated on Thu Jul 14 2022 15:33:26 by 1.7.2