/*
 * @file hv_drv_GpioSimI2c.h
 * @brief Header file of gpio simulate iic module.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 * (+) Use ()
 *
 * @endverbatim
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-06-06
 */

#ifndef _HV_DRV_GPIOSIMI2C_H
#define _HV_DRV_GPIOSIMI2C_H

/** @defgroup DRV_GPIOSIMI2C DRV GPIO SIMULATE IIC
 *  drv gpio simulate i2c functions
 *  @{
 */

typedef struct _GpioSimI2c
{
    UCHAR8 ucSdaPin;
    UCHAR8 ucSclPin;
}GpioSimI2c;

/** Initialize i2c
 *  @param pstInitParam pointer to i2c configuration parameters
 *  @return SUCCESS/FAILURE
 */
Status Hv_Drv_GpioSimI2c_Init(I2cBusID enBus, const GpioSimI2c *pstGpioSimI2c);

/** Send in master mode an amount of data
 *  @param ucDevAddr target device address
 *  @param pucRegAddr pointer to register address
 *  @param usRegAddrSize register address length
 *  @param pucData pointer to data buffer to be transmited
 *  @param usDataSize amount of data to be sent
 *  @retval Status SUCESS/FAILURE
*/
Status Hv_Drv_GpioSimI2c_SendData(I2cBusID enBus, UCHAR8 ucDevAddr, UCHAR8 *pucRegAddr,
                                  USHORT16 usRegAddrSize, UCHAR8 *pcData, UINT32 uiDatasize);

/** Receive in master mode an amount of data
*  @param ucDevAddr target device address
*  @param pucRegAddr pointer to register address
*  @param usRegAddrSize register address length
*  @param pucData pointer to data buffer to be transmited
*  @param usDataSize amount of data to be receive
*  @retval Status SUCESS/FAILURE
*/
Status Hv_Drv_GpioSimI2c_RecvData(I2cBusID enBus, UCHAR8 ucDevAddr, UCHAR8 *pucRegAddr,
                                  USHORT16 usRegAddrSize, UCHAR8 *pucData, USHORT16 usDataSize);

/** @} */

#endif




