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 25:aa4d92532e46, committed 2012-11-22
- Comitter:
- Sissors
- Date:
- Thu Nov 22 10:43:21 2012 +0000
- Parent:
- 24:fca9bb26ca15
- Child:
- 26:eb79370d38a2
- Commit message:
- Changed interrupt code (still doesnt work though, probably due to Serial interrupt not working)
Changed in this revision
| INIT.cpp | Show annotated file Show diff for this revision Revisions of this file |
| example2.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/INIT.cpp Thu Nov 22 09:38:19 2012 +0000
+++ b/INIT.cpp Thu Nov 22 10:43:21 2012 +0000
@@ -58,7 +58,7 @@
buffer_out[RxIrq] = 0;
buffer_count[RxIrq] = 0;
buffer_overflow[RxIrq] = 0;
- Serial::attach(this, &MODSERIAL::isr_rx, (SerialIrq)RxIrq);
+ Serial::attach(this, &MODSERIAL::isr_rx, (SerialIrq)1);
buffer_size[TxIrq] = txSize;
buffer[TxIrq] = txSize > 0 ? (char *)malloc(buffer_size[TxIrq]) : (char *)NULL;
@@ -66,7 +66,7 @@
buffer_out[TxIrq] = 0;
buffer_count[TxIrq] = 0;
buffer_overflow[TxIrq] = 0;
- Serial::attach(this, &MODSERIAL::isr_tx, (SerialIrq)TxIrq);
+ Serial::attach(this, &MODSERIAL::isr_tx, (SerialIrq)(0));
}
else {
error("MODSERIAL must have a defined UART to function.");
--- a/example2.cpp Thu Nov 22 09:38:19 2012 +0000 +++ b/example2.cpp Thu Nov 22 10:43:21 2012 +0000 @@ -76,7 +76,7 @@ */ -#ifdef COMPILE_EXAMPLE1_CODE_MODSERIAL +#ifdef COMPILE_EXAMPLE2_CODE_MODSERIAL #include "mbed.h" #include "MODSERIAL.h"
