/* Checks if the power on a specified port is ready.  */
USBPD_StatusTypeDef USBPD_PWR_IF_SupplyReady(uint8_t PortNum, USBPD_VSAFE_StatusTypeDef Vsafe)
/* Checks if the power on a specified port is ready.  */
USBPD_StatusTypeDef USBPD_PWR_IF_SupplyReady(uint8_t PortNum, USBPD_VSAFE_StatusTypeDef Vsafe)
{
  USBPD_StatusTypeDef status = USBPD_ERROR;
  if (!USBPD_PORT_IsValid(PortNum))
  {
    return USBPD_ERROR;
  }
  if (USBPD_VSAFE_0V == Vsafe)
  {
    status = USBPD_TCPM_VBUS_IsVsafe0V(PortNum);
  }
  else
  {
    status = USBPD_TCPM_VBUS_IsVsafe5V(PortNum);
  }
  return status;
}