This repository was archived by the owner on May 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ // STL includes
4
+ #include < string>
5
+
6
+ // hyperion incluse
7
+ #include " LedSpiDevice.h"
8
+
9
+ // /
10
+ // / Implementation of the LedDevice interface for writing to APA102 led device.
11
+ // /
12
+ // / APA102 is
13
+ // /
14
+ class LedDeviceAPA102 : public LedSpiDevice
15
+ {
16
+ public:
17
+ // /
18
+ // / Constructs the LedDevice for a string containing leds of the type APA102
19
+ // /
20
+ // / @param outputDevice The name of the output device (eg '/etc/SpiDev.0.0')
21
+ // / @param baudrate The used baudrate for writing to the output device
22
+ // /
23
+ LedDeviceAPA102 (const std::string& outputDevice,
24
+ const unsigned baudrate);
25
+
26
+ // /
27
+ // / Writes the led color values to the led-device
28
+ // /
29
+ // / @param ledValues The color-value per led
30
+ // / @return Zero on succes else negative
31
+ // /
32
+ virtual int write (const std::vector<ColorRgb> &ledValues);
33
+
34
+ // / Switch the leds off
35
+ virtual int switchOff ();
36
+
37
+ private:
38
+
39
+ // / the number of leds (needed when switching off)
40
+ size_t mLedCount ;
41
+ };
You can’t perform that action at this time.
0 commit comments