Petras Saduikis
/
SmallLEDChaser
main.cpp@0:37ed652973d2, 2009-12-07 (annotated)
- Committer:
- snatch59
- Date:
- Mon Dec 07 09:04:04 2009 +0000
- Revision:
- 0:37ed652973d2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
snatch59 | 0:37ed652973d2 | 1 | #include <mbed.h> |
snatch59 | 0:37ed652973d2 | 2 | |
snatch59 | 0:37ed652973d2 | 3 | int main() |
snatch59 | 0:37ed652973d2 | 4 | { |
snatch59 | 0:37ed652973d2 | 5 | BusOut leds(LED1, LED2, LED3, LED4); |
snatch59 | 0:37ed652973d2 | 6 | |
snatch59 | 0:37ed652973d2 | 7 | while (true) |
snatch59 | 0:37ed652973d2 | 8 | { |
snatch59 | 0:37ed652973d2 | 9 | (0x00 == leds || 0x08 == leds) ? leds = 1 : leds = leds << 1; |
snatch59 | 0:37ed652973d2 | 10 | wait(0.2); |
snatch59 | 0:37ed652973d2 | 11 | } |
snatch59 | 0:37ed652973d2 | 12 | } |