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.
Fork of MODSERIAL by
Revision 22:c11ea36f17f9, committed 2012-04-19
- Comitter:
- AjK
- Date:
- Thu Apr 19 20:47:46 2012 +0000
- Parent:
- 21:af2af4c61c2f
- Child:
- 23:5c45c21f36b7
- Commit message:
- 1.22 Buffer pointer fix by Anthony Wieser
Changed in this revision
--- a/ChangeLog.c Tue May 10 08:07:27 2011 +0000
+++ b/ChangeLog.c Thu Apr 19 20:47:46 2012 +0000
@@ -1,5 +1,13 @@
/* $Id:$
+1.22 19th April 2012
+
+ * http://mbed.org/forum/bugs-suggestions/topic/2936/
+ * Bug fix, protect important buffer pointers from IRQ corruption.
+ Credits:
+ Anthony Wieser http://mbed.org/users/WieserSoftwareLtd/ for the fix.
+ BlazeX http://mbed.org/users/BlazeX/ for the alert that a fix was needed!
+
1.21 10 May 2011
* http://mbed.org/forum/mbed/topic/2264
--- a/GETC.cpp Tue May 10 08:07:27 2011 +0000
+++ b/GETC.cpp Thu Apr 19 20:47:46 2012 +0000
@@ -56,7 +56,9 @@
_IER = ier;
}
+ __disable_irq();
buffer_count[RxIrq]--;
+ __enable_irq();
return c;
}
--- a/PUTC.cpp Tue May 10 08:07:27 2011 +0000
+++ b/PUTC.cpp Thu Apr 19 20:47:46 2012 +0000
@@ -65,7 +65,9 @@
}
_IER &= ~2;
buffer[TxIrq][buffer_in[TxIrq]] = c;
+ __disable_irq();
buffer_count[TxIrq]++;
+ __enable_irq();
buffer_in[TxIrq]++;
if (buffer_in[TxIrq] >= buffer_size[TxIrq]) {
buffer_in[TxIrq] = 0;
