8000 Update FastLEDsupport.h · GyverLibs/microLED@de3aeb5 · GitHub
[go: up one dir, main page]

Skip to content

Commit de3aeb5

Browse files
authored
Update FastLEDsupport.h
1 parent 7374371 commit de3aeb5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/FastLEDsupport.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@
55
#include <FastLED.h>
66
#include "microLED.h"
77

8-
mData CRGBtoData(CRGB col);
9-
#endif
8+
static mData CRGBtoData(CRGB col) {
9+
#if (COLOR_DEBTH == 1)
10+
return RGBto8(col.r, col.g, col.b);
11+
#elif (COLOR_DEBTH == 2)
12+
return RGBto16(col.r, col.g, col.b);
13+
#elif (COLOR_DEBTH == 3)
14+
return mData(col.r, col.g, col.b);
15+
#endif
16+
}
17+
#endif

0 commit comments

Comments
 (0)
0