Simple mbed library with macros

Dependents:   SimpleTimer SimpleUART SimpleTimer Stoppuhr1

Revision:
16:73f0f5d18800
Parent:
15:66150de7876b
Child:
18:aa026d9f7fc0
--- 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)