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

◆ spread_transpose8_symbol()

FASTLED_FORCE_INLINE FL_IRAM FL_OPTIMIZE_FUNCTION void fl::detail::spread_transpose8_symbol ( const u8 l[8],
u8 out[8] )

Transpose one symbol of 8 lanes (8 input bytes) into 8 output bytes: 8 pulses × 1 byte (bit L = lane L), pulse order 7..0 (out[0] = pulse 7).

Definition at line 65 of file bit_spread_lut.hpp.

65 {
66 const u32 a = spreadA(l[0]) | spreadA(l[1]) << 1 | spreadA(l[2]) << 2 | spreadA(l[3]) << 3 |
67 spreadA(l[4]) << 4 | spreadA(l[5]) << 5 | spreadA(l[6]) << 6 | spreadA(l[7]) << 7;
68 const u32 b = spreadB(l[0]) | spreadB(l[1]) << 1 | spreadB(l[2]) << 2 | spreadB(l[3]) << 3 |
69 spreadB(l[4]) << 4 | spreadB(l[5]) << 5 | spreadB(l[6]) << 6 | spreadB(l[7]) << 7;
70 out[0] = static_cast<u8>(a); out[1] = static_cast<u8>(a >> 8);
71 out[2] = static_cast<u8>(a >> 16); out[3] = static_cast<u8>(a >> 24);
72 out[4] = static_cast<u8>(b); out[5] = static_cast<u8>(b >> 8);
73 out[6] = static_cast<u8>(b >> 16); out[7] = static_cast<u8>(b >> 24);
74}
FASTLED_FORCE_INLINE u32 spreadA(u8 v)
Pulses 7,6,5,4 of v (byte j = bit (7-j)). Depends only on the high nibble.
FASTLED_FORCE_INLINE u32 spreadB(u8 v)
Pulses 3,2,1,0 of v (byte j = bit (3-j)). Depends only on the low nibble.
unsigned char u8
Definition stdint.h:131

References spreadA(), and spreadB().

Referenced by wave3_transpose_8(), wave8_transpose_8(), and wave8_transpose_8_bf1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: