/****************************************************************************** * File: HAL_LED_priv.h * Component: HAL_LED * Description: Private header — pixel struct, control struct with the * pixel buffer, and extern config array declaration. * * Layer: HAL - internal use only *****************************************************************************/ #ifndef HAL_LED_PRIV_H #define HAL_LED_PRIV_H #include "HAL_LED.h" #include "HAL_LED_cfg.h" extern const HAL_LED_tstrConfig HAL_LED_astrConfig[HAL_LED_NUM_INSTANCES]; /* ------------------------------------------------------------------------ */ /* PIXEL STRUCTURE */ /* ------------------------------------------------------------------------ */ /** * @brief Per-LED color data in GRB order (matching WS2812 protocol). * * Stored after intensity scaling has been applied, so these values * are the actual brightnesses sent to the hardware. */ typedef struct { u8 u8Green; u8 u8Red; u8 u8Blue; } HAL_LED_tstrPixel; /* ------------------------------------------------------------------------ */ /* CONTROL STRUCTURE */ /* ------------------------------------------------------------------------ */ /** * @brief Internal runtime state for all HAL_LED instances. * * astrPixels is a 2D array: [instance][led_index]. Each pixel holds * the intensity-scaled GRB values ready to be packed into 32-bit words * for the PIO FIFO. */ typedef struct { HAL_LED_tstrPixel astrPixels[HAL_LED_NUM_INSTANCES][HAL_LED_MAX_LEDS_PER_INSTANCE]; } HAL_LED_tstrControl; #endif /* HAL_LED_PRIV_H */