373 {
374
375
376
377
378 Wave8Byte lane_waves[4];
379
380
381 for (int symbol_idx = 0; symbol_idx < 8; symbol_idx++) {
382 u8 lane_bytes[4] = {0, 0, 0, 0};
383
384
385 for (int byte_idx = 0; byte_idx < 4; byte_idx++) {
386 u8 input_byte = transposed[symbol_idx * 4 + byte_idx];
387
388
389 int pulse_bit_hi = 7 - (byte_idx * 2);
390 int pulse_bit_lo = pulse_bit_hi - 1;
391
392
393
394 for (int lane = 0; lane < 4; lane++) {
395
396 u8 pulse_hi = (input_byte >> (4 + lane)) & 1;
397 u8 pulse_lo = (input_byte >> lane) & 1;
398
399
400 lane_bytes[lane] |= (pulse_hi << pulse_bit_hi);
401 lane_bytes[lane] |= (pulse_lo << pulse_bit_lo);
402 }
403 }
404
405
406 for (int lane = 0; lane < 4; lane++) {
407 lane_waves[lane].symbols[symbol_idx].data = lane_bytes[lane];
408 }
409 }
410
411
412 for (int lane = 0; lane < 4; lane++) {
413 fl::isr::memcpy(output + lane *
sizeof(Wave8Byte), &lane_waves[lane],
sizeof(Wave8Byte));
414 }
415}
FL_OPTIMIZE_FUNCTION FL_IRAM FASTLED_FORCE_INLINE void memcpy(void *FL_RESTRICT_PARAM dst, const void *FL_RESTRICT_PARAM src, size_t num_bytes)
ISR-optimized memcpy with alignment detection and switch dispatch.