-
Notifications
You must be signed in to change notification settings - Fork 14
/
LedDriverPowerShiftRegister.h
54 lines (40 loc) · 1.21 KB
/
LedDriverPowerShiftRegister.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
51
52
53
54
/**
* LedDriverPowerShiftRegister
* Implementierung auf der Basis von TPICB595N.
*
* @mc Arduino/RBBB
* @autor Christian Aschoff / caschoff _AT_ mac _DOT_ com
* @version 1.3
* @created 13.8.2013
* @updated 16.2.2015
*
* Versionshistorie:
* V 1.0: - Erstellt.
* V 1.1: - Anpassung auf Helligkeit 0-100%
* V 1.2: - Getter fuer Helligkeit nachgezogen.
* V 1.3: - Unterstuetzung fuer die alte Arduino-IDE (bis 1.0.6) entfernt.
*/
#ifndef LED_DRIVER_POWER_SHIFT_REGISTER_H
#define LED_DRIVER_POWER_SHIFT_REGISTER_H
#include "Arduino.h"
#include "LedDriver.h"
#include "ShiftRegister.h"
class LedDriverPowerShiftRegister : public LedDriver {
public:
LedDriverPowerShiftRegister(byte data, byte clock, byte latch, byte outputEnable);
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 _outputEnable;
ShiftRegister *_shiftRegister;
};
#endif