István Cserny / Mbed 2 deprecated Lab07_STM32_RTOS

Dependencies:   mbed mbed-rtos

Revision:
0:a57cf939cc01
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Feb 24 07:44:32 2022 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "rtos.h"
+ 
+DigitalOut led1(D13);
+DigitalOut led2(D12);
+Thread thread;
+ 
+void led2_thread() {
+    while (true) {
+        led2 = !led2;
+        Thread::wait(1000);
+    }
+}
+ 
+int main() {
+    thread.start(led2_thread);
+    
+    while (true) {
+        led1 = !led1;
+        Thread::wait(500);
+    }
+}
\ No newline at end of file