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.
Dependencies: fll mbed-rtos mbed
Diff: fll.cpp
- Revision:
- 8:d16a0fcc2735
- Parent:
- 7:61b4825304e2
- Child:
- 9:0d6631edfc32
diff -r 61b4825304e2 -r d16a0fcc2735 fll.cpp
--- a/fll.cpp Sat Feb 14 16:39:53 2015 +0000
+++ b/fll.cpp Sat Feb 14 16:51:25 2015 +0000
@@ -167,3 +167,25 @@
}
}
}
+
+// ----
+// main
+// ----
+void invoke_sinkrun(const void *p) {
+ ((Sink*)p)->run();
+}
+
+void fll_run(Producer* producer) {
+ Mail<button_t, MAIL_BOX_SIZE>* mail_box = new Mail<button_t, MAIL_BOX_SIZE>();
+ Mutex* mutex = new Mutex();
+
+ Sink* sink = new Sink(producer, mail_box, mutex);
+
+ Ticker ticker;
+ Output* output = new Output(mail_box);
+
+ Thread th(invoke_sinkrun, (void *)sink);
+ ticker.attach(output, &Output::run, FRAME);
+
+ Thread::wait(osWaitForever);
+}
\ No newline at end of file
