forked from bracci/Qlockthree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LedDriverDefault.h
50 lines (34 loc) · 1.01 KB
/
LedDriverDefault.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
LedDriverDefault
Implementierung auf der Basis 74HC595 und UDN2981A.
@mc Arduino/RBBB
@autor Christian Aschoff / caschoff _AT_ mac _DOT_ com
@version 1.4
@created 18.1.2013
*/
#ifndef LED_DRIVER_DEFAULT_H
#define LED_DRIVER_DEFAULT_H
#include "Arduino.h"
#include "ShiftRegister.h"
#include "LedDriver.h"
class LedDriverDefault : public LedDriver {
public:
LedDriverDefault(byte data, byte clock, byte latch, byte outputEnable, byte linesToWrite);
void init();
void printSignature();
void writeScreenBufferToMatrix(word matrix[16], boolean onChange, eColors a_color = color_none);
void setBrightness(byte brightnessInPercent);
byte getBrightness();
void setLinesToWrite(byte linesToWrite);
void shutDown();
void wakeUp();
void clearData();
private:
byte _brightnessInPercent;
byte _linesToWrite;
byte _outputEnablePin;
ShiftRegister *_shiftRegister;
unsigned int _delayOldMatrix;
unsigned int _delayNewMatrix;
};
#endif