/**
 * @file hv_drv_Ddcci.c
 * @brief ddcci driver c file.
 * @details This file provides the following functions: \n
 *          (1) Init function \n
 *          (2) Msg queue management \n
 *          (3) Msg send function \n
 *          (4) Msg Handler function \n
 *
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-01-31
 * @copyright Copyright(c),2022-8, Hiview Software. All rights reserved.
 * @par History:
 * <table>
 * <tr><th>Author       <th>Date            <th>Change Description
 * <tr><td>zhaoxiaodong      <td>2024-02-05      <td>init
 * </table>
 */


#include "hv_comm_Assert.h"
#include "hv_comm_Log.h"
#include "hv_comm_Assert.h"
#include "hv_drv_Ddcci.h"
#include "hv_chip_Config.h"

//****************************************************************************
// VARIABLE DECLARATIONS
//****************************************************************************
#define PQTOOL_CMD                SW_DUMMY_PQTOOL_CMD
#define PQTOOL_STATUS             SW_DUMMY_PQTOOL_DATA0

#define U32_SETBYTE3(v32, v8) ((v32 & 0x00FFFFFF) | ((v8 << 24) & 0xFF000000))

//****************************************************************************
// FUNCTION DECLARATIONS
//****************************************************************************


//****************************************************************************
// FUNCTION DEFINITIONS
//****************************************************************************

UCHAR8 Hv_Drv_Ddcci_GetPQToolCmd(VOID)
{
    return U32_BYTE3(HV_R32(PQTOOL_CMD));
}

UINT32 Hv_Drv_Ddcci_GetPQToolItem(VOID)
{
    return (HV_R32(PQTOOL_CMD) & 0x00FFFFFF);
}

UCHAR8 Hv_Drv_Ddcci_GetPQToolStatus(VOID)
{
    return (UCHAR8)HV_R32(PQTOOL_STATUS);
}

UINT32 Hv_Drv_Ddcci_GetPQToolInfo(VOID)
{
    return HV_R32(PQTOOL_STATUS);
}

VOID Hv_Drv_Ddcci_SetPQToolCmd(UCHAR8 ucCmd)
{
    HV_W32(PQTOOL_CMD, U32_SETBYTE3(HV_R32(PQTOOL_CMD), ucCmd));
    return;
}

VOID Hv_Drv_Ddcci_SetPQToolStatus(UCHAR8 ucSts)
{
    HV_W32(PQTOOL_STATUS, ucSts);
    return;
}

VOID Hv_Drv_Ddcci_SetPQToolInfo(UINT32 uiInfo)
{
    HV_W32(PQTOOL_STATUS, uiInfo);
    return;
}