Simon Ford
/
GlobalPinAssignments
main.cpp
- Committer:
- simon
- Date:
- 2009-11-26
- Revision:
- 0:18acd94db10b
File content as of revision 0:18acd94db10b:
// Example showing multiple files using the same mbed interface instances // sford // // * The interfaces we want are in interfaces.h/cpp (e.g. our digital outputs) // - they are instanced in the .cpp file so they exist // - they are listed in the .h file as extern, so others can use them // * Both main and otheruser include interfaces.h, so can both use it #include "mbed.h" #include "interfaces.h" #include "otheruser.h" int main() { while(1) { led1 = led3 = 0; // main uses led1, defined in interfaces led2 = led4 = 1; wait(0.2); otheruser(); // otheruser uses led1, defined in interfaces wait(0.2); } }