/**
 * @file hv_cal_OsdGraphic.h
 * @brief Osd Cal layer Graphic interface.
 * @verbatim
 * ==============================================================================
 *                        ##### How to use this driver #####
 * ==============================================================================
 * @endverbatim
 *
 * @author HiView SoC Software Team
 * @version 0.0.1
 * @date 2022-08-22
 */

#ifndef _HV_CAL_OSDGRAPHIC_H
#define _HV_CAL_OSDGRAPHIC_H

#define DM_BUF_SIZE          0x200
#define OSD_GRAPHIC_BURSTLEN 32

/**
 * @brief get graphic enable/disable status
 * @param[in] None
 * @return HV_TRUE for enable, HV_FALSE for disable
 */
BOOL Hv_Cal_OsdGraphic_GetEnable(VOID);

/**
 * @brief set graphic enable/disable status
 * @param[in] bEnable 1 for enable, 0 for disable
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_SetEnable(BOOL bEnable);

/**
 * @brief get graphic area
 * @param[out] pstArea area structure
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_GetRange(OsdArea *pstArea);

/**
 * @brief set graphic area
 * @param[in] pstArea area structure
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_SetRange(OsdArea *pstArea);

/**
 * @brief set DDR address
 * @param[in] uiAddr ddr address
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_SetDDRAddr(UINT32 uiAddr);

/**
 * @brief set graphic pixel format
 * @param[in] enFormat pixel format
 * @param[in] ucAlpha alpha value, used for RGB565/RGB888
 * @param[in] uiColor color in RGB888, used for A8/A4 format
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_SetFormat(OsdPixelFormat enFormat, UCHAR8 ucAlpha, UINT32 uiColor);

/**
 * @brief set graphic color key enable/disable status
 * @param[in] bEnable 1 for enable, 0 for disable
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_SetColorKeyEnable(BOOL bEnable);

/**
 * @brief set graphic color key
 * @param[in] uiColorKey color key in RGB888 format
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_SetColorKey(UINT32 uiColorKey);

/**
 * @brief set Graphic data padding
 * @param[in] bPadOne 1 for padding 1, 0 for padding 0
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_SetDataPadding(BOOL bPadOne);

/**
 * @brief set graphic read DMA
 * @param[in] usColStep column step in bytes, align to 16
 * @param[in] ucBurstLen data size for one burst
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_SetRDMA(USHORT16 usColStep, UCHAR8 ucBurstLen);

/**
 * @brief Graphic initialization function
 * @param[in] None
 * @return VOID without return
 */
VOID Hv_Cal_OsdGraphic_Init(VOID);

#endif
