This is my first mbed program for the Kinetis K64F Freedom board.
Dependencies: mbed
Fork of k46f_blink by
Revision 0:a4420c888977, committed 2014-05-08
- Comitter:
- rcflyair
- Date:
- Thu May 08 15:09:20 2014 +0000
- Commit message:
- My first mbed program for the Kinetis K64F Freedom board.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 08 15:09:20 2014 +0000 @@ -0,0 +1,39 @@ +#include "mbed.h" + +int main() { + DigitalOut RLED(PTB22); + DigitalOut GLED(PTE26); + DigitalOut BLED(PTB21); + enum color {none, red, green, blue}; + color state = none; + + while (true) { + switch (state) { + case none : + RLED = 1; + GLED = 1; + BLED = 1; + state = red; + break; + case red : + RLED = 0; + GLED = 1; + BLED = 1; + state = green; + break; + case green : + RLED = 1; + GLED = 0; + BLED = 1; + state = blue; + break; + case blue : + RLED = 1; + GLED = 1; + BLED = 0; + state = red; + break; + } + wait(1); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 08 15:09:20 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6473597d706e \ No newline at end of file