Simple mbed library with macros

Dependents:   SimpleTimer SimpleUART SimpleTimer Stoppuhr1

Files at this revision

API Documentation at this revision

Comitter:
Alkorin
Date:
Sun Nov 14 22:48:59 2010 +0000
Parent:
15:66150de7876b
Child:
17:36a0cb1929c2
Commit message:
Fixed a typo in SERIAL_PUTCHAR

Changed in this revision

serial.h Show annotated file Show diff for this revision Revisions of this file
--- a/serial.h	Sun Nov 14 22:46:26 2010 +0000
+++ b/serial.h	Sun Nov 14 22:48:59 2010 +0000
@@ -129,7 +129,7 @@
 #define SERIAL_PUTCHAR(c)               do {                                                        \
                                             while (GET_BIT_VALUE(UART_BASE->LSR, THRE_BIT) == 0);   \
                                             UART_BASE->THR = c;                                     \
-                                        }
+                                        } while(0)
 
 #define SERIAL_DATA_TO_READ()           (GET_BIT_VALUE(UART_BASE->LSR, RDR_BIT) == 1)