MCPcopy Create free account
hub / github.com/kiibohd/controller / Pixel_process

Function Pixel_process

Macro/PixelMap/pixel.c:2633–3008  ·  view source on GitHub ↗

Pixel Procesing Loop

Source from the content-addressed store, hash-verified

2631
2632// Pixel Procesing Loop
2633inline void Pixel_process()
2634{
2635 // Start latency measurement
2636 Latency_start_time( pixelLatencyResource );
2637
2638 // Only update frame when ready
2639 switch( Pixel_FrameState )
2640 {
2641 case FrameState_Update:
2642 case FrameState_Pause:
2643 break;
2644 default:
2645 goto pixel_process_final;
2646 }
2647
2648 // Pause animation if set
2649 switch ( Pixel_animationControl )
2650 {
2651 case AnimationControl_Forward: // Ok
2652 case AnimationControl_ForwardOne: // Ok + 1, then stop
2653 Pixel_FrameState = FrameState_Update;
2654 break;
2655 case AnimationControl_Stop: // Clear animations, then proceed forward
2656 Pixel_FrameState = FrameState_Update;
2657 Pixel_clearAnimations();
2658 Pixel_clearPixels();
2659 Pixel_animationControl = AnimationControl_Forward;
2660 break;
2661 case AnimationControl_Reset: // Clear animations, then restart initial
2662 Pixel_FrameState = FrameState_Update;
2663 Pixel_clearAnimations();
2664 Pixel_clearPixels();
2665 Pixel_SecondaryProcessing_setup(); // Reset fade and gamma correction
2666 Pixel_animationControl = AnimationControl_Forward;
2667 Pixel_initializeStartAnimations();
2668 break;
2669 case AnimationControl_WipePause: // Pauses animations, clears the display
2670 Pixel_animationControl = AnimationControl_Pause; // Update one more time
2671 Pixel_clearPixels();
2672 goto pixel_process_done;
2673 case AnimationControl_Clear: // Clears the display, animations continue
2674 Pixel_animationControl = AnimationControl_Forward;
2675 Pixel_FrameState = FrameState_Update;
2676 Pixel_clearPixels();
2677 break;
2678 default: // Pause
2679 Pixel_FrameState = FrameState_Pause;
2680 goto pixel_process_final;
2681 }
2682
2683 // First check if we are in a test mode
2684 switch ( Pixel_testMode )
2685 {
2686 // Single channel control
2687 case PixelTest_Chan_Single:
2688 // Increment channel
2689 if ( Pixel_testPos >= Pixel_TotalChannels_KLL )
2690 Pixel_testPos = 0;

Callers 10

Scan_loopFunction · 0.85
Scan_pollFunction · 0.85
Scan_pollFunction · 0.85
Scan_pollFunction · 0.85
Scan_pollFunction · 0.85
Scan_pollFunction · 0.85
Scan_pollFunction · 0.85
Scan_pollFunction · 0.85
Scan_pollFunction · 0.85
Scan_pollFunction · 0.85

Calls 12

Latency_start_timeFunction · 0.85
Pixel_clearAnimationsFunction · 0.85
Pixel_clearPixelsFunction · 0.85
Pixel_channelToggleFunction · 0.85
Pixel_channelSetFunction · 0.85
Pixel_pixelToggleFunction · 0.85
Pixel_pixelSetFunction · 0.85
Pixel_stackProcessFunction · 0.85
Latency_end_timeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…