demo versie 16/05

Dependencies:   EthernetInterface mbed-rto mbed

Fork of ProjectVLC by Klaas Govaerts

Revision:
2:36158325f7b0
Child:
8:a987e04734dd
diff -r 3e5c46178d7f -r 36158325f7b0 LEDDriver.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LEDDriver.h	Sun Apr 15 09:59:55 2018 +0000
@@ -0,0 +1,31 @@
+#ifndef LEDDRIVER_H 
+#define LEDDRIVER_H 
+
+#include "rtos.h"
+#include "copy.h"
+#include "mbed.h"
+
+class LEDDriver
+{
+    private:
+    int** messageList;
+    int* start;
+    int* stop;
+    int* directions;
+    Mutex* lock;
+    Copy copy;
+    DigitalOut* leds;
+    
+    int getDirection(int id);
+    void encode(int direction,int led);
+    void encodeAll(int numberOfLeds);
+    
+    public:
+    
+    void drive(int numberOfLeds);
+    LEDDriver(/*Mutex* lock,*/ int sharedDirections[], int sizeOfSharedDirections);
+    void run(int numberOfLeds);
+
+};
+
+#endif
\ No newline at end of file