Martin Smith
/
GlobalTest
Shows how to use an object from multiple .cpp files
Revision 0:3a1f649f1e2e, committed 2011-08-17
- Comitter:
- ms523
- Date:
- Wed Aug 17 07:16:56 2011 +0000
- Commit message:
Changed in this revision
diff -r 000000000000 -r 3a1f649f1e2e Global.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Global.cpp Wed Aug 17 07:16:56 2011 +0000 @@ -0,0 +1,3 @@ +#include "Global.h" + +DigitalOut myled(LED1); \ No newline at end of file
diff -r 000000000000 -r 3a1f649f1e2e Global.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Global.h Wed Aug 17 07:16:56 2011 +0000 @@ -0,0 +1,3 @@ +#include "mbed.h" + +extern DigitalOut myled; \ No newline at end of file
diff -r 000000000000 -r 3a1f649f1e2e main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Aug 17 07:16:56 2011 +0000 @@ -0,0 +1,11 @@ +#include "Global.h" + +int main() { + + while (1) { + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + } +} \ No newline at end of file
diff -r 000000000000 -r 3a1f649f1e2e mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Aug 17 07:16:56 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912