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 Nucleo_piano by
Revision 0:5701b41769fd, committed 2016-03-17
- Comitter:
- bcostm
- Date:
- Thu Mar 17 15:17:54 2016 +0000
- Child:
- 1:d645363d5305
- Commit message:
- First release
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Mar 17 15:17:54 2016 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void print_char(char c = '*')
+{
+ printf("%c", c);
+ fflush(stdout);
+}
+
+DigitalOut led1(LED1);
+
+void print_thread(void const *argument)
+{
+ while (true) {
+ Thread::wait(1000);
+ print_char();
+ }
+}
+
+int main()
+{
+ printf("\n\n*** RTOS basic example ***\n");
+ Thread thread(print_thread, NULL, osPriorityNormal, DEFAULT_STACK_SIZE);
+ while (true) {
+ led1 = !led1;
+ Thread::wait(500);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Thu Mar 17 15:17:54 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#bdd541595fc5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Mar 17 15:17:54 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/c0f6e94411f5 \ No newline at end of file
