Example of an "extern" declaration to reuse a global variable defined in one file in another file.
Dependencies: mbed
main.cpp
- Committer:
- bjo3rn
- Date:
- 2015-09-23
- Revision:
- 0:bc708d703171
File content as of revision 0:bc708d703171:
#include "mbed.h" #include "myWait.h" DigitalOut redLed(LED_RED); DigitalOut greenLed(LED_GREEN); int main() { while(1) { redLed = 1; myWait(0.2); redLed = 0; myWait(0.2); } }