José Neto / Mbed 2 deprecated ProjetoFinal

Dependencies:   mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
zeneto
Date:
Sat Jul 07 02:17:40 2018 +0000
Parent:
5:ffba8ba016a7
Commit message:
FINAL DO FINAL

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Jul 07 02:14:53 2018 +0000
+++ b/main.cpp	Sat Jul 07 02:17:40 2018 +0000
@@ -2,8 +2,10 @@
 #include "rtos.h"
 #include "stdio.h"
  
- //Fazer escalonador com prioridade, para os botões, piscar led em azul com frequencia diferente com as maiores prioridades
- //sensor piscar em vermelho com a prioridade maior
+//Projeto Final - Sistemas Operacionais
+//José de Faria Leite Neto
+//Wilian Henrique Cavassin
+//Fernando Levy Silvestre de Assis
  
  //Process struct
  struct prc
@@ -53,6 +55,7 @@
  
      
 //Button function 
+//If pressed, put the process on queue
 void button1_pressed() {
         scd[0].id = b1.id;
         scd[0].pri = b1.pri;
@@ -233,17 +236,19 @@
     scd[3] = prca;
     scd[4] = prca;
   
-  
+  //Ground
   ground = 0;
+  //Leds start at 0
   ledr = !ledr;
   ledg = !ledg;
   ledb = !ledb;
+  
+  //Threads starting
   threadb1.start(button1_thread);
   threadb2.start(button2_thread);
   threadb3.start(button3_thread);
   threadb4.start(button4_thread);
   threadms.start(button5_thread);
-  
   scdT.start(scheduler_thread);
 
   while (1) {}