jeje

Dependencies:   mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
JONEGU
Date:
Thu Nov 09 15:10:23 2017 +0000
Commit message:
Ejercicio7Practica3

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
diff -r 000000000000 -r 61e934827cac main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 09 15:10:23 2017 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+#include "rtos.h"
+
+
+DigitalOut Led1(PB_5);
+DigitalOut Led2(PB_3);
+DigitalOut Led3(PA_10);
+
+
+void blink1( void constant*argument)
+{
+    while(1)
+    {
+        Led1= !Led1;
+        Thread: wait(1000);
+        }
+}
+
+void blink2( void constant*argument)
+{
+    while(1)
+    {
+        Led2= !Led2;
+        Thread: wait(1200);
+        }
+}
+
+void blink3( void constant*argument)
+{
+    while(1)
+    {
+        Led3= !Led3;
+        Thread: wait(1500);
+        }
+}
+
+int main()
+{
+    Thread thread1(blink1, NULL, osPriorityNormal, DEFAULT_STACK_SIZE);
+    Thread thread2(blink2, NULL, osPriorityNormal, DEFAULT_STACK_SIZE);
+    Thread thread3(blink3, NULL, osPriorityNormal, DEFAULT_STACK_SIZE);
+    while (true) 
+}
diff -r 000000000000 -r 61e934827cac mbed-rtos.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Thu Nov 09 15:10:23 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#5713cbbdb706
diff -r 000000000000 -r 61e934827cac mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 09 15:10:23 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e7ca05fa8600
\ No newline at end of file