-
Notifications
You must be signed in to change notification settings - Fork 0
/
LedDriverPowerShiftRegister.h
58 lines (42 loc) · 1.12 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
55
56
/**
* LedDriverPowerShiftRegister.h
* Implementierung auf der Basis von TPICB595N.
*
* @mc Arduino/RBBB
* @autor Christian Aschoff / caschoff _AT_ mac _DOT_ com
* @version 1.1
* @created 13.8.2013
* @updated 18.8.2013
*
* Versionshistorie:
* V 1.0: - Erstellt.
* V 1.1: - Anpassung auf Helligkeit 0-100%
*/
#ifndef LED_DRIVER_POWER_SHIFT_REGISTER_H
#define LED_DRIVER_POWER_SHIFT_REGISTER_H
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#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);
void setBrightness(unsigned int brightnessInPercent);
void setLinesToWrite(byte linesToWrite);
void shutDown();
void wakeUp();
void clearData();
protected:
unsigned int _brightness;
byte _linesToWrite;
private:
byte _outputEnable;
ShiftRegister *_shiftRegister;
};
#endif