First version

Dependencies:   mbed EthernetInterface mbed-rto

Committer:
albireo987
Date:
Mon May 14 20:02:42 2018 +0000
Revision:
70:939f51a1a223
Parent:
67:7951d11432f8
Child:
71:5e8ba1357442
Child:
74:8c0068ed7c1e
Child:
77:6477a4fefa70
updated leddriver.h;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
albireo987 6:36158325f7b0 1 #ifndef LEDDRIVER_H
albireo987 6:36158325f7b0 2 #define LEDDRIVER_H
albireo987 6:36158325f7b0 3
albireo987 6:36158325f7b0 4 #include "mbed.h"
albireo987 26:4c673da1a3ae 5 #include "rtos.h"
albireo987 6:36158325f7b0 6
albireo987 6:36158325f7b0 7 class LEDDriver
albireo987 6:36158325f7b0 8 {
albireo987 6:36158325f7b0 9 private:
albireo987 8:a987e04734dd 10
KlaasGovaerts 47:8fe84f455571 11 int messageList[8];
KlaasGovaerts 54:4274186bf584 12 int codedMessage0[25];
KlaasGovaerts 54:4274186bf584 13 int codedMessage1[25];
KlaasGovaerts 54:4274186bf584 14 int codedMessage2[25];
KlaasGovaerts 54:4274186bf584 15 int codedMessage3[25];
KlaasGovaerts 54:4274186bf584 16 int codedMessage4[25];
albireo987 26:4c673da1a3ae 17 Queue<int,8>* queue;
KlaasGovaerts 48:c5cd73d93045 18 DigitalOut *leds[8];
KlaasGovaerts 45:2d877f01ca7b 19 int currentLocation;
albireo987 6:36158325f7b0 20
albireo987 26:4c673da1a3ae 21 /**prep for eventual multithreading
albireo987 26:4c673da1a3ae 22 *methode om nieuwe richtingen van de receiver klasse te ontvangen
albireo987 26:4c673da1a3ae 23 *@params aantal leds die een nieuw bericht moeten krijgen
albireo987 26:4c673da1a3ae 24 */
KlaasGovaerts 55:4e06cfb6d010 25 void poll(int numberOfLeds);
albireo987 38:47c075a354b5 26
KlaasGovaerts 45:2d877f01ca7b 27 void setLEDS(int j);
KlaasGovaerts 45:2d877f01ca7b 28
albireo987 10:7871aeacea08 29 public:
KlaasGovaerts 55:4e06cfb6d010 30
albireo987 10:7871aeacea08 31 /**
albireo987 10:7871aeacea08 32 *methode dat alle leds aanstuurt
albireo987 10:7871aeacea08 33 *@params aantal leds aan te sturen
albireo987 10:7871aeacea08 34 */
albireo987 6:36158325f7b0 35 void drive(int numberOfLeds);
albireo987 10:7871aeacea08 36
albireo987 10:7871aeacea08 37 /**
albireo987 10:7871aeacea08 38 *constructor voor een driver object
albireo987 32:537005b4a065 39 *@params de queue met de waarden die een richting aanduiden
albireo987 10:7871aeacea08 40 */
albireo987 26:4c673da1a3ae 41 LEDDriver(Queue<int,8>* queue);
albireo987 70:939f51a1a223 42 /*
albireo987 70:939f51a1a223 43 *Destructor
albireo987 70:939f51a1a223 44 */
KlaasGovaerts 58:738f026cf667 45 ~LEDDriver();
KlaasGovaerts 58:738f026cf667 46
KlaasGovaerts 44:ffac07bff0d8 47 void drive8leds();
albireo987 6:36158325f7b0 48
KlaasGovaerts 45:2d877f01ca7b 49 void initArrays();
KlaasGovaerts 45:2d877f01ca7b 50 };
albireo987 6:36158325f7b0 51
albireo987 6:36158325f7b0 52 #endif