/*
 * @file hv_drv_Led.h
 * @brief Header file of LED module.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 * (+) Use ()
 *
 * @endverbatim
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-12-16
 */

#ifndef _HV_DRV_LED_H
#define _HV_DRV_LED_H
#include "hv_cal_LedComm.h"
/** @defgroup DRV_LED DRV_LED
 *  drv led functions
 *  @{
 */
typedef enum _LedDriverId
{
    LED_DRIVER_ID_TLC5971 = 0,
    LED_DRIVER_ID_MAX
}LedDriverId;

/**
 * @brief Fill GS Data Api for Led devices
 * @param uiDevId TLC5971 device id of daisy chain
 * @param enChId TLC5971 channel id
 * @param pstPixel pixel RGB data for daisy chain
 */
Status Hv_Drv_Led_FillColorData(LedDeviceId uiDevId, LedChannelId enChId, LedColor *pstPixel);

/**
 * @brief Clear GS Data Api for Led devices
 */
Status Hv_Drv_Led_ClearColorData(VOID);

/**
 * @brief Set serialize global brightness for device daisy chain
 * @param pstGbc pixel RGB brightness for daisy chain
 */
Status Hv_Drv_Led_SetGlobalBrightness(LedGlBc *pstGbc);

/**
 * @brief Set serialize global brightness ratio for device daisy chain by J/K
 * @param ucJ:Numerator
 * @param ucK:Denominator
 */
VOID Hv_Drv_Led_SetGlobalBrightnessRatio(UCHAR8 ucJ, UCHAR8 ucK);

/**
 * @brief Dump Data Api for Led devices
 */
Status Hv_Drv_Led_DumpDataBuffer(VOID);

/**
 * @brief Enable/Disable Color Adjust for Led devices
 * @param bEnable enable/disable
 */
VOID Hv_Drv_Led_AdjustColorEnable(BOOL bEnable);

/**
 * @brief Update serialize pixel data for device daisy chain
 * @param pstPixels pixel RGB data for daisy chain
 * @param uiPixelsNum number of pixels in daisy chain
 */
Status Hv_Drv_Led_UpdateColor(VOID);

/**
 * @brief Initialize serialize device daisy chain
 * @return Status
 */
Status Hv_Drv_Led_Init(VOID);
/** @} */
#endif
