FastLED 3.9.15
Loading...
Searching...
No Matches

◆ rgbw_partial_reorder()

void fl::rgbw_partial_reorder ( EOrderW w_placement,
uint8_t b0,
uint8_t b1,
uint8_t b2,
uint8_t w,
uint8_t * out_b0,
uint8_t * out_b1,
uint8_t * out_b2,
uint8_t * out_b3 )

Definition at line 134 of file rgbw.cpp.

136 {
137
138 uint8_t out[4] = {b0, b1, b2, 0};
139 switch (w_placement) {
140 // unrolled loop for speed.
141 case W3:
142 out[3] = w;
143 break;
144 case W2:
145 out[3] = out[2]; // memmove and copy.
146 out[2] = w;
147 break;
148 case W1:
149 out[3] = out[2];
150 out[2] = out[1];
151 out[1] = w;
152 break;
153 case W0:
154 out[3] = out[2];
155 out[2] = out[1];
156 out[1] = out[0];
157 out[0] = w;
158 break;
159 }
160 *out_b0 = out[0];
161 *out_b1 = out[1];
162 *out_b2 = out[2];
163 *out_b3 = out[3];
164}
@ W2
White is third.
Definition eorder.h:25
@ W3
White is fourth.
Definition eorder.h:24
@ W0
White is first.
Definition eorder.h:27
@ W1
White is second.
Definition eorder.h:26

References W0, W1, W2, and W3.

Referenced by PixelController< RGB_ORDER, LANES, MASK >::loadAndScaleRGBW().

+ Here is the caller graph for this function: