Terry Lung
/
NewLoader
test
Fork of NewLoader by
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut myled(LED1); 00004 InterruptIn button(BUTTON1); 00005 00006 void leave_bootloader() 00007 { 00008 mbed_start_application(POST_APPLICATION_ADDR); 00009 } 00010 00011 int main() { 00012 00013 button.rise(&leave_bootloader); 00014 00015 while(1) 00016 { 00017 myled = 1; // LED is ON 00018 wait(0.5); // 200 ms 00019 myled = 0; // LED is OFF 00020 wait(1.0); // 1 sec 00021 } 00022 00023 }
Generated on Mon Aug 8 2022 17:32:30 by 1.7.2