Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 /* 00002 * Tested with Nudleo-F767Zi and Nudleo-F429ZI 00003 * Builded with Mbed Studio 1.4.3 00004 */ 00005 00006 #include "mbed.h" //MbedOS 6.15.5 00007 00008 #define DELAY 200ms 00009 00010 DigitalOut myled1(LED1); 00011 DigitalOut myled2(LED2); 00012 DigitalOut myled3(LED3);*/ 00013 InterruptIn iin(BUTTON1); 00014 bool flag = false; 00015 00016 void fall(){ 00017 flag = true; 00018 } 00019 00020 int main() 00021 { 00022 printf("AppStart_Firm1\n"); 00023 iin.fall(callback(fall)); 00024 00025 while (true) { 00026 myled1 = 1; myled2 = 0; myled3 = 0; ThisThread::sleep_for(DELAY); 00027 myled1 = 0; myled2 = 1; myled3 = 0; ThisThread::sleep_for(DELAY); 00028 myled1 = 0; myled2 = 0; myled3 = 1; ThisThread::sleep_for(DELAY); 00029 myled1 = 0; myled2 = 1; myled3 = 0; ThisThread::sleep_for(DELAY); 00030 ThisThread::sleep_for(DELAY); 00031 if(flag){printf("Restarting...\n"); ThisThread::sleep_for(1s); NVIC_SystemReset();} 00032 } 00033 }
Generated on Thu Jul 14 2022 08:32:35 by
1.7.2