Chris Styles
/
GlobalObjects
Revision 0:f9691e8d9ff9, committed 2009-11-26
- Comitter:
- chris
- Date:
- Thu Nov 26 16:06:59 2009 +0000
- Commit message:
Changed in this revision
diff -r 000000000000 -r f9691e8d9ff9 Objects.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Objects.cpp Thu Nov 26 16:06:59 2009 +0000 @@ -0,0 +1,7 @@ +#include "Objects.h" + +LocalFileSystem local("local"); +FILE *fp; +Serial pc (USBTX,USBRX); +DigitalOut led1 (LED1); +
diff -r 000000000000 -r f9691e8d9ff9 Objects.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Objects.h Thu Nov 26 16:06:59 2009 +0000 @@ -0,0 +1,9 @@ +// Some global objects +#include "mbed.h" + +extern LocalFileSystem local; +extern FILE *fp; +extern int GlobalInt; +extern Serial pc; +extern DigitalOut led1; +
diff -r 000000000000 -r f9691e8d9ff9 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 26 16:06:59 2009 +0000 @@ -0,0 +1,18 @@ +#include "Objects.h" + + +int main() { + + pc.printf("Hello\n"); + + fp = fopen("/local/test.txt","a"); + fprintf(fp,"Hello filesystem\n"); + fclose(fp); + + while(1) { + led1 = 1; + wait(0.2); + led1 = 0; + wait(0.2); + } +}
diff -r 000000000000 -r f9691e8d9ff9 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 26 16:06:59 2009 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/32af5db564d4