![](/media/cache/group/IOP_DtuxQTL.jpg.50x50_q85.jpg)
External Interrupt example for WIZwiki-W7500 Academy
Dependencies: mbed
Fork of GPIOIn_INT_HelloWorld_WIZwiki-W7500 by
Revision 10:e47e799ccc98, committed 2016-02-03
- Comitter:
- IOP
- Date:
- Wed Feb 03 07:21:45 2016 +0000
- Parent:
- 9:7c19b19301c5
- Commit message:
- update mbed lib
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 |
diff -r 7c19b19301c5 -r e47e799ccc98 main.cpp --- a/main.cpp Wed Jan 06 06:36:42 2016 +0000 +++ b/main.cpp Wed Feb 03 07:21:45 2016 +0000 @@ -2,21 +2,24 @@ #include "mbed.h" -InterruptIn mysw(D10); // push switch DigitalOut myled_R(LED_RED); // LED_RED on WIZwiki-W7500 DigitalOut myled_B(LED_BLUE); // LED_BLUE on WIZwiki-W7500 +InterruptIn mysw(D10); // push switch + -void exin(){ // interrupt function - myled_B = !myled_B; // Blue LED Toggle with rising edge -} +void exin(); // interrupt function int main() { - mysw.rise(&exin); // attach the address of the exin function to the rising edge + mysw.rise(&exin); // attach the address of the exin function to the rising edge - while(1) { - myled_R = !myled_R; // Red LED switching continuosly + while(1){ + myled_R = !myled_R; // Red LED switching continuosly wait(0.5); } +} + +void exin(){ + myled_B = !myled_B; // Blue LED Toggle with rising edge } \ No newline at end of file
diff -r 7c19b19301c5 -r e47e799ccc98 mbed.bld --- a/mbed.bld Wed Jan 06 06:36:42 2016 +0000 +++ b/mbed.bld Wed Feb 03 07:21:45 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96 \ No newline at end of file