/* Hard Reset: end of procedure. 
It notifies to the STUSB16xx device that PRS transaction is ending  */
USBPD_StatusTypeDef USBPD_HW_IF_HR_End(uint8_t PortNum, USBPD_PortPowerRole_TypeDef CurrentRole)
/* Hard Reset: end of procedure. 
It notifies to the STUSB16xx device that PRS transaction is ending  */
USBPD_StatusTypeDef USBPD_HW_IF_HR_End(uint8_t PortNum, USBPD_PortPowerRole_TypeDef CurrentRole)
{
  USBPD_StatusTypeDef ret = USBPD_OK;
  ret = HW_IF_COMM_WAIT(PortNum, COMM_TO_DEFAULT);
  if (ret != USBPD_OK)
  {
    return ret;
  }
  ret = (USBPD_StatusTypeDef)STUSB1602_Type_C_Command(STUSB1602_I2C_Add(PortNum), PD_HARD_RESET_COMPLETE_REQ);
  ret = (USBPD_StatusTypeDef)STUSB1602_VBUS_Select_Status_Set(STUSB1602_I2C_Add(PortNum), 5000);
  STUSB1602_CC_Detect_Alrt_Int_Mask_Set(STUSB1602_I2C_Add(PortNum), CC_Detect_Int_UNMASKED);
  HW_IF_COMM_RELEASE(PortNum);
  return ret;
}