rtos1

Dependencies:   mbed-rtos mbed

Fork of rtos_basic by mbed official

Files at this revision

API Documentation at this revision

Comitter:
xiscosc
Date:
Fri Nov 13 14:40:11 2015 +0000
Parent:
6:209f4db62daf
Commit message:
rtos1

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Jun 04 16:01:32 2013 +0100
+++ b/main.cpp	Fri Nov 13 14:40:11 2015 +0000
@@ -1,21 +1,29 @@
 #include "mbed.h"
 #include "rtos.h"
- 
-DigitalOut led1(LED1);
-DigitalOut led2(LED2);
- 
-void led2_thread(void const *args) {
+  
+void thread1(void const *args) {
     while (true) {
-        led2 = !led2;
-        Thread::wait(1000);
+        printf("HOLA SOY EL THREAD1\r\n");
+        printf("HOLA SOY EL THREAD1-2\r\n");
+        //Thread::wait(300);
+    }
+}
+
+void thread2(void const *args) {
+    while (true) {
+        printf("HOLA SOY EL THREAD2\r\n");
+        printf("HOLA SOY EL THREAD2-2\r\n");
+        //Thread::wait(300);
     }
 }
  
 int main() {
-    Thread thread(led2_thread);
+    Thread my_thread1(thread1);
+    Thread my_thread2(thread2);
     
     while (true) {
-        led1 = !led1;
-        Thread::wait(500);
+        printf("HOLA SOY EL MAIN\r\n");
+        printf("HOLA SOY EL MAIN-2\r\n");
+        //Thread::wait(300);
     }
 }
--- a/mbed-rtos.lib	Tue Jun 04 16:01:32 2013 +0100
+++ b/mbed-rtos.lib	Fri Nov 13 14:40:11 2015 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/mbed-rtos/
\ No newline at end of file
+https://mbed.org/users/mbed_official/code/mbed-rtos/#6d90423c236e
--- a/mbed.bld	Tue Jun 04 16:01:32 2013 +0100
+++ b/mbed.bld	Fri Nov 13 14:40:11 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11
\ No newline at end of file