Jannis Marinitsch
/
Maskieren
Maskieren der 8 LEDs
main.cpp@0:4580f98ab3e1, 2016-01-11 (annotated)
- Committer:
- Jannis
- Date:
- Mon Jan 11 16:00:05 2016 +0000
- Revision:
- 0:4580f98ab3e1
Maskieren ?bung 8LEDs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jannis | 0:4580f98ab3e1 | 1 | #include "mbed.h" |
Jannis | 0:4580f98ab3e1 | 2 | |
Jannis | 0:4580f98ab3e1 | 3 | #define LED_MASK 0x000030DB |
Jannis | 0:4580f98ab3e1 | 4 | |
Jannis | 0:4580f98ab3e1 | 5 | PortOut ledport(Port1, LED_MASK); |
Jannis | 0:4580f98ab3e1 | 6 | |
Jannis | 0:4580f98ab3e1 | 7 | int main() { |
Jannis | 0:4580f98ab3e1 | 8 | while(1) { |
Jannis | 0:4580f98ab3e1 | 9 | ledport = LED_MASK; |
Jannis | 0:4580f98ab3e1 | 10 | wait(0.2); |
Jannis | 0:4580f98ab3e1 | 11 | ledport = 0; |
Jannis | 0:4580f98ab3e1 | 12 | wait(0.2); |
Jannis | 0:4580f98ab3e1 | 13 | } |
Jannis | 0:4580f98ab3e1 | 14 | } |