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
- Committer:
- mab5449
- Date:
- 2017-01-13
- Revision:
- 5:476186ff82cf
- Parent:
- 4:fc60c5b6c104
- Child:
- 7:49b71bc18049
File content as of revision 5:476186ff82cf:
#include "mbed.h"
Thread thread;
DigitalOut led(LED1);
void led_thread() {
while (true) {
// Signal flags that are reported as event are automatically cleared.
Thread::signal_wait(0x1);
led = !led;
}
}
int main (void) {
thread.start(callback(led_thread));
while (true) {
wait(1);
thread.signal_set(0x1);
}
}