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.
Diff: main.cpp
- Revision:
- 4:fc60c5b6c104
- Parent:
- 1:6a8fcc666593
- Child:
- 5:476186ff82cf
--- a/main.cpp Tue Jun 04 15:54:12 2013 +0100
+++ b/main.cpp Wed Jan 11 15:07:51 2017 +0000
@@ -3,7 +3,7 @@
DigitalOut led(LED1);
-void led_thread(void const *argument) {
+void led_thread() {
while (true) {
// Signal flags that are reported as event are automatically cleared.
Thread::signal_wait(0x1);
@@ -12,8 +12,10 @@
}
int main (void) {
- Thread thread(led_thread);
-
+ Thread thread;
+
+ thread.start(callback(led_thread));
+
while (true) {
Thread::wait(1000);
thread.signal_set(0x1);