Simple mbed library with macros
Dependents: SimpleTimer SimpleUART SimpleTimer Stoppuhr1
Diff: leds.h
- Revision:
- 6:9e1310782abf
- Parent:
- 4:afddc4848b6c
- Child:
- 8:f8b47457fdcf
--- a/leds.h Sat Nov 13 11:20:42 2010 +0000 +++ b/leds.h Sat Nov 13 14:47:51 2010 +0000 @@ -13,7 +13,9 @@ /** Macros **/ #define LEDS_INIT() LPC_GPIO1->FIODIR |= LEDS_MASK; -#define LEDS_SET(value) LPC_GPIO1->FIOMASK = ~LEDS_MASK; \ - LPC_GPIO1->FIOPIN = (value); +#define LEDS_SET(value) { \ + LPC_GPIO1->FIOMASK = ~LEDS_MASK; \ + LPC_GPIO1->FIOPIN = (value); \ + } #endif \ No newline at end of file