![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First version
Dependencies: mbed EthernetInterface mbed-rto
Diff: LEDDriver.h
- Revision:
- 6:36158325f7b0
- Child:
- 8:a987e04734dd
--- /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