
#ifndef _HV_DRV_TYPECCIRCUIT_H
#define _HV_DRV_TYPECCIRCUIT_H

/**
 * @brief Get VBus voltage value of type-c.
 * @return VBus voltage value of type-c
 */
USHORT16 Hv_Drv_Typec_GetVBusVal(void);

/**
 * @brief Master I2C initialization.
 * @return HV_TRUE: succeeded HV_FALSE: failed
 */
UCHAR8 Hv_Drv_Typec_I2CMstInitial(void);

/**
 * @brief Sim I2C initialization.
 * @return HV_TRUE: succeeded HV_FALSE: failed
 */
UCHAR8 Hv_Drv_Typec_SimI2CMstInitial(void);

/**
 * @brief Set the voltage and current of the VBUS output.
 * @param[in] u8PortNum  Typec port numbuer.
 * @param[in] u16Voltage  the voltage of the VBUS output.
 * @param[in] u16Current  the current of the VBUS output.
 * @return void
 */
void Hv_Drv_Typec_SetVBusOutVal(UCHAR8 u8PortNum, USHORT16 u16Voltage, USHORT16 u16Current);

/**
 * @brief The pin initialization of type-c.
 * @return void
 */
void Hv_Drv_Typec_PinInit(void);

/**
 * @brief Set port power on or off of type-c.
 * @param[in] u8PortNum  Type-c port numbuer.
 * @param[in] u8PwrSet HV_TRUE: on, HV_FALSE: off.
 * @return void
 */
void Hv_Drv_Typec_SetPortPowerONOFF(UCHAR8 u8PortNum, UCHAR8 u8PwrSet);

/**
 * @brief Configure VBus dischage on or off of type-c.
 * @param[in] u8PortNum  Type-c port numbuer.
 * @param[in] u8DischargeSet HV_TRUE: on, HV_FALSE: off.
 * @return void
 */
void Hv_Drv_Typec_ConfigVBUSDischarge(UCHAR8 u8PortNum, UCHAR8 u8DischargeSet);

/**
 * @brief Set CC1 vconn on or off of type-c.
 * @param[in] u8PortNum  Type-c port numbuer.
 * @param[in] u8PwrSet HV_TRUE: on, HV_FALSE: off.
 * @return void
 */
void Hv_Drv_Typec_SetVconnCC1ONOFF(UCHAR8 u8PortNum, UCHAR8 u8PwrSet);

/**
 * @brief Set CC2 vconn on or off of type-c.
 * @param[in] u8PortNum  Type-c port numbuer.
 * @param[in] u8PwrSet HV_TRUE: on, HV_FALSE: off.
 * @return void
 */
void Hv_Drv_Typec_SetVconnCC2ONOFF(UCHAR8 u8PortNum, UCHAR8 u8PwrSet);

/**
 * @brief Set CC1 vconn dischage on or off of type-c.
 * @param[in] u8PortNum  Type-c port numbuer.
 * @param[in] u8DischargeSet HV_TRUE: on, HV_FALSE: off.
 * @return void
 */
void Hv_Drv_Typec_VconnCC1Discharge(UCHAR8 u8PortNum, UCHAR8 u8DischargeSet);

/**
 * @brief Set CC2 vconn dischage on or off of type-c.
 * @param[in] u8PortNum  Type-c port numbuer.
 * @param[in] u8DischargeSet HV_TRUE: on, HV_FALSE: off.
 * @return void
 */
void Hv_Drv_Typec_VconnCC2Discharge(UCHAR8 u8PortNum, UCHAR8 u8DischargeSet);

/**
 * @brief The interrupt initialization of type-c.
 * @return void
 */
void Hv_Drv_Typec_IntInit(void);

/**
 * @brief The VBus initialization of type-c.
 * @return void
 */
void Hv_Drv_Typec_VBusInitial(void);

/**
 * @brief Set DP's aux power off.
 * @return the number of events in the message queue of type-c
 */
void Hv_Drv_Typec_DpAuxPowerOff(void);

/**
 * @brief Set DP's aux power on.
 * @return the number of events in the message queue of type-c
 */
void Hv_Drv_Typec_DpAuxPowerOn(void);
#endif
