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.
Fork of K64F-RTOS-Disco-LEDs by
main.cpp
- Committer:
- bundgus
- Date:
- 2014-08-07
- Revision:
- 0:f1e76cd00a6e
File content as of revision 0:f1e76cd00a6e:
#include "mbed.h"
#include "rtos.h"
void blinkLED1(void const *args) {
DigitalOut led1(LED1);
while(true){
led1 = !led1;
Thread::wait(300);
}
}
void blinkLED2(void const *args) {
DigitalOut led2(LED2);
while(true){
led2 = !led2;
Thread::wait(500);
}
}
void blinkLED3(void const *args) {
DigitalOut led3(LED3);
while(true){
led3 = !led3;
Thread::wait(800);
}
}
int main() {
Thread thread1(blinkLED1);
Thread thread2(blinkLED2);
Thread thread3(blinkLED3);
while (true) {
Thread::wait(250);
}
}
