practica2ejercicio7

Dependencies:   mbed-rtos mbed

Fork of PR2EJ7 by MII1SistElec

Revision:
1:ee5228330793
Parent:
0:1272b81992d4
Child:
2:150c7630f878
diff -r 1272b81992d4 -r ee5228330793 main.cpp
--- a/main.cpp	Mon Nov 06 17:04:13 2017 +0000
+++ b/main.cpp	Mon Nov 06 17:06:51 2017 +0000
@@ -9,7 +9,7 @@
 
 void blink1(void const *argument) {
 while (1) {
-        Led1 = !Led1;
+        Led1 = !Led1; //cambiar el Led de estado
         Thread::wait(1000); //tiempo de espera para cambiar el led1 de estado
     }
     }
@@ -17,7 +17,7 @@
 
 void blink2(void const *argument) {
 while (1) {
-       Led2 = !Led2;
+       Led2 = !Led2; //cambiar el Led de estado
         Thread::wait(1200); //tiempo de espera para cambiar el led2 de estado
     }
 }
@@ -25,19 +25,19 @@
 void blink3(void const *argument) {
 
 while (1) {
-        Led3 = !Led3;
+        Led3 = !Led3; //cambiar el Led de estado
         Thread::wait(1500); //tiempo de espera para cambiar el led3 de estado
     }
 }
 
 int main()
 {
-Thread thread1(blink1, NULL, osPriorityNormal, DEFAULT_STACK_SIZE);
+Thread thread1(blink1, NULL, osPriorityNormal, DEFAULT_STACK_SIZE); //forma apropiada de llamar a los Thread
 Thread thread2(blink2, NULL, osPriorityNormal, DEFAULT_STACK_SIZE);
 Thread thread3(blink3, NULL, osPriorityNormal, DEFAULT_STACK_SIZE);
-while (true) {
+while (true) { //código para que el programa no acabe y los Thread sigan ejecutándose
        
-        Thread::wait(500);
+        Thread::wait(500); 
     }
 
 }