419 {
420
421
422
423
424 Wave8Byte lane_waves[8];
425
426
427 for (int symbol_idx = 0; symbol_idx < 8; symbol_idx++) {
428 u8 lane_bytes[8] = {0, 0, 0, 0, 0, 0, 0, 0};
429
430
431
432
433 for (int byte_idx = 0; byte_idx < 8; byte_idx++) {
434 u8 input_byte = transposed[symbol_idx * 8 + byte_idx];
435
436
437
438 int pulse_bit = 7 - byte_idx;
439
440
441
442 for (int lane = 0; lane < 8; lane++) {
443
444 u8 pulse = (input_byte >> lane) & 1;
445
446
447 lane_bytes[lane] |= (pulse << pulse_bit);
448 }
449 }
450
451
452 for (int lane = 0; lane < 8; lane++) {
453 lane_waves[lane].symbols[symbol_idx].data = lane_bytes[lane];
454 }
455 }
456
457
458 for (int lane = 0; lane < 8; lane++) {
459 fl::isr::memcpy(output + lane *
sizeof(Wave8Byte), &lane_waves[lane],
sizeof(Wave8Byte));
460 }
461}
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.