Demonstration of a message queue + memory pool

Fork of Task632-mbedos54 by Stage-1 Students SoCEM

Revision:
11:6cfaf7dfecb9
Parent:
10:3a3d2a571c8f
--- a/main.cpp	Tue Mar 22 13:40:05 2016 +0000
+++ b/main.cpp	Mon Apr 03 14:16:17 2017 +0000
@@ -1,13 +1,12 @@
 #include "mbed.h"
-#include "rtos.h"
 #include "string.h"
 #include <stdio.h>
 #include <ctype.h>
 
 #define SWITCH1_RELEASE 1
 
-void thread1( const void*  );
-void thread2( const void*  );
+void thread1();
+void thread2();
 void switchISR();
 
 //Analogue inputs
@@ -83,7 +82,7 @@
 }
 
 //Normal priority thread (consumer)
-void thread1( const void* arg ) 
+void thread1() 
 {      
     while (true) {
         //Block on the queue
@@ -122,7 +121,8 @@
     timer.attach(&adcISR, 0.1);
                
     //Threads
-    t1 = new Thread(&thread1); 
+    t1 = new Thread(); 
+    t1->start(thread1);
     
     printf("Main Thread\n");
     while (true) {