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 #include "mbed.h" 00002 00003 DigitalOut led1(LED1); 00004 DigitalOut led2(LED2); 00005 00006 // Blink function toggles the led in a long running loop 00007 void blink(DigitalOut *led) { 00008 *led = !*led; 00009 wait(1); 00010 *led = !*led; 00011 } 00012 int main() { 00013 while(1){ 00014 00015 Thread thread1; 00016 Thread thread2; 00017 00018 thread1.start(callback(blink, &led1)); 00019 thread1.join(); 00020 thread2.start(callback(blink, &led2)); 00021 thread2.join(); 00022 } 00023 }
Generated on Tue Jul 19 2022 18:27:30 by
1.7.2