/*
 * @file hv_mw_Factory.h
 * @brief Header file of Factory module.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 * (+) Use ()
 *
 * @endverbatim
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-05-04
 */

#ifndef __HV_MW_FACTORY_H__
#define __HV_MW_FACTORY_H__

#include "hv_comm_DataType.h"
#include "hv_comm_DataBase.h"

typedef enum _ColorTemperatureType
{
    FACTORY_COLOR_TEMPER_STANDARD,
    FACTORY_COLOR_TEMPER_WARM,
    FACTORY_COLOR_TEMPER_COOL,
    FACTORY_COLOR_TEMPER_CUSTOM,
    FACTORY_COLOR_TEMPER_EYESHIELD,
    FACTORY_COLOR_TEMPER_SRGB,
    FACTORY_COLOR_TEMPER_BLUISH,
}ColorTemperatureType;

/**
 * @brief Get SN.
 * @param[in] pucString: SN
 * @return strlen sn.
 */
UCHAR8 Hv_Mw_Factory_GetSN(UCHAR8 *pucString);

/**
 * @brief Set EDID write protect.
 * @param[in] bEnble: on/off
 */
VOID Hv_Mw_Factory_SetEdidWp(BOOL bEn);

/**
 * @brief Get EDID write protect.
 * @return EDID_WP status.
 */
BOOL Hv_Mw_Factory_GetEdidWp(VOID);

/**
 * @brief Get EDID Info.
 */
VOID Hv_Mw_Factory_GetEdidInfo(LinkPortIndex enPortIndex, HvFactoryEdidInfo *pstFactEdidDetail);

/**
 * @brief Get EDID Info to osd.
 */
VOID Hv_Mw_Factory_GetEdidInfoToOsd(LinkPortIndex enPortIndex, HvEdidInfoToOsd *pstFactEdidInfoToOsd);

/**
 * @brief Set Enable Uart for log.
 * @param[in] bEnble: on/off
 */
VOID Hv_Mw_Factory_SetEnableUart(BOOL bEnble);

/**
 * @brief Get Enable Uart.
 * @return Enable Uart.
 */
BOOL Hv_Mw_Factory_GetEnableUart(VOID);

/**
 * @brief 用于产线设置出厂默认亮度.
 */
VOID Hv_Mw_Factory_SetFactoryDefaultBacklight(UCHAR8 uiVal);

/**
 * @brief 用于产线设置不同地区的能效.
 */
VOID Hv_Mw_Factory_SetFactoryEnergy(UCHAR8 ucVal);

/**
 * @brief wite product sn.
 */
VOID Hv_Mw_Factory_WriteProductSN(const CHAR8 *pcTargetProductSN);

/**
 * @brief Get panel ssc enable.
 * @param[in] bEn: 0 disable, 1 enable
 */
VOID Hv_Mw_Factory_SetPanelSscEable(BOOL bEn);

/**
 * @brief Set panel ssc freq.
 * @param[in] ucFreq: frequence
 */
VOID Hv_Mw_Factory_SetPanelSscFreq(UCHAR8 ucFreq);

/**
 * @brief Get panel ssc freq.
 * @return panel ssc freq.
 */
UCHAR8 Hv_Mw_Factory_GetPanelSscFreq(VOID);

/**
 * @brief Set panel ssc setp.
 * @param[in] ucStep: setp
 */
VOID Hv_Mw_Factory_SetPanelSscStep(UCHAR8 ucStep);

/**
 * @brief Get panel ssc setp.
 * @return panel ssc setp.
 */
UCHAR8 Hv_Mw_Factory_GetPanelSscSetp(VOID);

/**
 * @brief Get ddr ssc enable.
 * @param[in] bEn: 0 disable, 1 enable
 */
VOID Hv_Mw_Factory_SetDdrSscEable(BOOL bEn);

/**
 * @brief Set ddr ssc freq.
 * @param[in] ucFreq: frequence
 */
VOID Hv_Mw_Factory_SetDdrSscFreq(UCHAR8 ucFreq);

/**
 * @brief Get ddr ssc freq.
 * @return ddr ssc freq.
 */
UCHAR8 Hv_Mw_Factory_GetDdrSscFreq(VOID);

/**
 * @brief Set ddr ssc setp.
 * @param[in] ucStep: setp
 */
VOID Hv_Mw_Factory_SetDdrSscStep(UCHAR8 ucStep);

/**
 * @brief Get ddr ssc setp.
 * @return ddr ssc setp.
 */
UCHAR8 Hv_Mw_Factory_GetDdrSscSetp(VOID);

/**
 * @brief Set default color temperature.
 * @param[in] ucColorTempType: color temperature type.
 * @param[in] stColTemp: R,G,B Gain value.
 */
VOID Hv_Mw_Factory_SetColorTemperature(ColorTemperatureType ucColorTempType, ColorTemperature stColTemp);

/**
 * @brief Get default color temperature.
 * @param[in] ucColorTempType: color temperature type.
 * @return ColorTemperature R,G,B Gain value.
 */
ColorTemperature Hv_Mw_Factory_GetColorTemperature(ColorTemperatureType ucColorTempType);

/**
 * @brief Manual operate panel pattern.
 * @param[in] ucKtxPattSwitch: on/off
 * @param[in] ucPatternMode: pattern color
 */
VOID Hv_Mw_Factory_ShowPanelPattern(UCHAR8 ucKtxPattSwitch, UCHAR8 ucPatternMode);

/**
 * @brief Set picture mode default mode.
 * @param[in] ucMode: picture mode
 */
VOID Hv_Mw_Factory_SetDefPicMode(UCHAR8 ucMode);

/**
 * @brief Reset Panel Power On Count Time.
 */
VOID Hv_Mw_Factory_ResetPanelOnCountTime(VOID);

/**
 * @brief Recover UserData and SystemData to default value.
 */
VOID Hv_Mw_Factory_FactoryReset(VOID);

/**
 * @brief set factory mode enable.
 */
VOID Hv_Mw_Factory_SetFactoryModeEnable(BOOL bEn);

/**
 * @brief Get factory mode enable.
 */
UCHAR8 Hv_Mw_Factory_GetFactoryModeEnable();

/**
 * @brief set burn in enable.
 */
VOID Hv_Mw_Factory_SetBurnInEnalbe(BOOL bEn);

/**
 * @brief Save panel power on time .
 * @param[in] bSaveTimeImme: immediate save time，true only when power off.
 */
VOID Hv_Mw_Factory_SavePanelOnCountTime(BOOL bSaveTimeImme);

/**
 * @brief get panel power on time .
 */
VOID Hv_Mw_Factory_GetPanelOnTime(USHORT16 *usPanelOnTimeHour, USHORT16 *usPanelOnTimeMin);

/**
 * @brief nofify pm factory mode.
 */
VOID Hv_Mw_FactoryModeToPm(BOOL bEn);

/**
 * @brief set Dynamic Panel Enable.
 */
VOID Hv_Mw_Factory_SetDynamicPanelEn(BOOL bEn);

/**
 * @brief set Dynamic Panel index.
 */
VOID Hv_Mw_Factory_SetDynamicPanelIndex(UCHAR8 ucIndex);

/**
 * @brief get Dynamic Panel info.
 */
VOID Hv_Mw_Factory_GetDynamicPanelInfo(BOOL *pbDynamicPanelEn, UCHAR8 *pucDynamicPanelIndex, UCHAR8 *pucPanelNum);

/**
 * @brief Factory Init
 */
VOID Hv_Mw_Factory_Init(VOID);

#endif
