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

#ifndef _HV_CAL_OSDDDR_H
#define _HV_CAL_OSDDDR_H

#include "hv_comm_DataType.h"
#include "hv_drv_OsdTypes.h"

/**
 * @brief set DDR write pixel format
 * @param[in] enFormat pixel format
 * @return VOID without return
 */
VOID Hv_Cal_OsdDDR_WriteSetPixelFormat(OsdPixelFormat enFormat);

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

/**
 * @brief set ddr area
 * @param[in] usWidth DDR area width
 * @param[in] usHeight DDR area height
 * @param[in] ucBurstLen 128bit count for one burst
 * @return VOID without return
 */
VOID Hv_Cal_OsdDDR_WriteSetSize(USHORT16 usWidth, USHORT16 usHeight, UCHAR8 ucBurstLen);

/**
 * @brief set DDR write column step
 * @param[in] usStep step in bytes, aligned to 16
 * @return VOID without return
 */
VOID Hv_Cal_OsdDDR_WriteSetColStep(USHORT16 usStep);

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

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

/**
 * @brief set DDR read 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_OsdDDR_ReadSetPixelFormat(OsdPixelFormat enFormat, UCHAR8 ucAlpha, UINT32 uiColor);

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

/**
 * @brief set ddr area
 * @param[in] usWidth DDR area width
 * @param[in] usHeight DDR area height
 * @param[in] ucBurstLen 128bit count for one burst
 * @return VOID without return
 */
VOID Hv_Cal_OsdDDR_ReadSetSize(USHORT16 usWidth, USHORT16 usHeight, UCHAR8 ucBurstLen);

/**
 * @brief set DDR read step in bytes
 * @param[in] usStepBytes step size in bytes, aligned to 16
 * @return VOID without return
 */
VOID Hv_Cal_OsdDDR_ReadSetColStep(USHORT16 usStepBytes);

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

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

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

BOOL Hv_Cal_OsdDDR_ReadGetEnable(VOID);
/**
 * @brief set low bit data padding for pixel & alpha
 * @param[in] bPadOne 1 to pad 1, 0 to pad 0
 * @return VOID without return
 */
VOID Hv_Cal_OsdDDR_ReadSetDataPadding(BOOL bPadOne);

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

#endif
