First version

Dependencies:   mbed EthernetInterface mbed-rto

Committer:
KlaasGovaerts
Date:
Wed May 02 15:04:28 2018 +0000
Revision:
44:ffac07bff0d8
Parent:
42:bb1d9d8a9fe4
Child:
45:2d877f01ca7b
Aanpassingen LEDDriver klasse

Who changed what in which revision?

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