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

◆ wave8_convert_byte_to_wave8byte()

FASTLED_FORCE_INLINE FL_IRAM FL_OPTIMIZE_FUNCTION void fl::detail::wave8_convert_byte_to_wave8byte ( u8 byte_value,
const Wave8BitExpansionLut & lut,
Wave8Byte * output )

Helper: Convert byte to Wave8Byte using nibble LUT (internal use only)

Note
Inline implementation for ISR performance

Definition at line 47 of file wave8.hpp.

49 {
50 // ISR-optimized copy: Copy high nibble (4 bytes = 1 x uint32_t)
51 const Wave8Bit *high_nibble_data = lut.lut[(byte_value >> 4) & 0xF];
52 isr::memcpy_32(fl::bit_cast_ptr<u32>(&output->symbols[0]),
53 fl::bit_cast_ptr<const u32>(high_nibble_data),
54 1); // 4 bytes = 1 x uint32_t
55
56 // ISR-optimized copy: Copy low nibble (4 bytes = 1 x uint32_t)
57 const Wave8Bit *low_nibble_data = lut.lut[byte_value & 0xF];
58 isr::memcpy_32(fl::bit_cast_ptr<u32>(&output->symbols[4]),
59 fl::bit_cast_ptr<const u32>(low_nibble_data),
60 1); // 4 bytes = 1 x uint32_t
61}
FL_OPTIMIZE_FUNCTION FL_IRAM FASTLED_FORCE_INLINE void memcpy_32(u32 *FL_RESTRICT_PARAM dst, const u32 *FL_RESTRICT_PARAM src, size_t count)
ISR-optimized 32-bit block copy for 4-byte aligned memory.
Definition memcpy.h:32
To * bit_cast_ptr(void *storage) FL_NOEXCEPT
Definition bit_cast.h:60
Type-safe container for packed 8-bit wave pulse pattern.
Definition wave8.h:22

References fl::bit_cast_ptr(), and fl::isr::memcpy_32().

Referenced by fl::wave8(), fl::wave8Transpose_16(), fl::wave8Transpose_2(), fl::wave8Transpose_4(), and fl::wave8Transpose_8().

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