demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Committer:
KlaasGovaerts
Date:
Wed May 02 13:44:20 2018 +0000
Revision:
42:962dbbd32f4c
Parent:
38:47c075a354b5
Added printf statements

Who changed what in which revision?

UserRevisionLine numberNew contents of line
KlaasGovaerts 0:98e4994363bf 1 #include "mbed.h"
KlaasGovaerts 21:fe6a58e84929 2 #include "rtos.h"
KlaasGovaerts 19:5ee34e60a31d 3 #include "Interpreter.h"
KlaasGovaerts 6:9903a0906a72 4 #include "TCPlistener.h"
KlaasGovaerts 30:996da48a265c 5 #include "Receiver.h"
albireo987 25:4c673da1a3ae 6 #include "LEDDriver.h"
KlaasGovaerts 30:996da48a265c 7
KlaasGovaerts 31:915f6cb7ffa5 8 void receive(Queue<int,8>* queue){
KlaasGovaerts 42:962dbbd32f4c 9 printf("receive executed.\r\n");
KlaasGovaerts 30:996da48a265c 10 Receiver receiver(queue);
KlaasGovaerts 30:996da48a265c 11 receiver.start();
KlaasGovaerts 30:996da48a265c 12 }
KlaasGovaerts 30:996da48a265c 13
albireo987 26:29948b116e82 14 void LEDStart(Queue<int,8>* queue)
albireo987 26:29948b116e82 15 {
KlaasGovaerts 42:962dbbd32f4c 16 printf("LEDStart executed.\r\n");
albireo987 26:29948b116e82 17 LEDDriver driver = LEDDriver(queue);
albireo987 26:29948b116e82 18 driver.run(8);
albireo987 26:29948b116e82 19 }
albireo987 32:537005b4a065 20
KlaasGovaerts 3:1c9645acea2f 21 int main (void){
KlaasGovaerts 42:962dbbd32f4c 22 printf("Main executed.\r\n");
KlaasGovaerts 31:915f6cb7ffa5 23 Queue<int,8> queue;
albireo987 38:47c075a354b5 24 Thread threadeth;
albireo987 38:47c075a354b5 25 Thread driverThread;
KlaasGovaerts 21:fe6a58e84929 26 while(true){
albireo987 38:47c075a354b5 27 threadeth.start(receive,&queue);
albireo987 38:47c075a354b5 28 driverThread.start(LEDStart,&queue);
KlaasGovaerts 31:915f6cb7ffa5 29 }
KlaasGovaerts 4:0d013b7e4dea 30 }