/* It checks if Vbus is below the safe voltage threshold.  */
USBPD_StatusTypeDef USBPD_HW_IF_HR_CheckVbusVSafe0V(uint8_t PortNum, USBPD_PortPowerRole_TypeDef CurrentRole)
/* It checks if Vbus is below the safe voltage threshold.  */
USBPD_StatusTypeDef USBPD_HW_IF_HR_CheckVbusVSafe0V(uint8_t PortNum, USBPD_PortPowerRole_TypeDef CurrentRole)
{
  if (CurrentRole == USBPD_PORTPOWERROLE_SRC)
  {
    return USBPD_OK;
  }
  if (CurrentRole == USBPD_PORTPOWERROLE_SNK)
  {
    return STUSB1602_VBUS_Presence_Get(STUSB1602_I2C_Add(PortNum)) == VBUS_below_UVLO_threshold ? USBPD_OK : USBPD_BUSY;
  }
  return USBPD_ERROR;
}