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

◆ rgbw_partial_reorder()

void 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 133 of file rgbw.cpp.

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