/* Request the DPM to setup the new power level.  */
USBPD_StatusTypeDef USBPD_DPM_SetupNewPower(uint8_t PortNum)
/* Request the DPM to setup the new power level.  */
USBPD_StatusTypeDef USBPD_DPM_SetupNewPower(uint8_t PortNum)
{
  USBPD_StatusTypeDef status;
  uint8_t rdoposition, previous_rdoposition;
  rdoposition = DPM_Ports[PortNum].DPM_RDOPosition;
  previous_rdoposition = DPM_Ports[PortNum].DPM_RDOPositionPrevious;
  if (rdoposition > 0)
  {
    status = USBPD_PWR_IF_SetProfile(PortNum, rdoposition-1, previous_rdoposition);
  }
  else
  {
    status = USBPD_PWR_IF_SetProfile(PortNum, 0, 0);
  }
  return status;
}