/* UserCableDetection reporting events on a specified port from CAD layer.  */
void USBPD_DPM_UserCableDetection(uint8_t PortNum, USBPD_CAD_EVENT State)
/* UserCableDetection reporting events on a specified port from CAD layer.  */
void USBPD_DPM_UserCableDetection(uint8_t PortNum, USBPD_CAD_EVENT State)
{
  switch(State)
  {
  case USBPD_CAD_EVENT_ATTEMC:
    if(USBPD_PORTPOWERROLE_SRC == DPM_Params[PortNum].PE_PowerRole)
    {
    }
    DPM_Ports[PortNum].DPM_IsConnected = 1;
    break;
  case USBPD_CAD_EVENT_ATTACHED:
    if(USBPD_PORTPOWERROLE_SRC == DPM_Params[PortNum].PE_PowerRole)
    {
    }
    DPM_Ports[PortNum].DPM_IsConnected = 1;
    break;
  case USBPD_CAD_EVENT_LEGACY:
    break;
  case USBPD_CAD_EVENT_DETACHED :
  case USBPD_CAD_EVENT_EMC :
  default :
    memset(&DPM_Ports[PortNum], 0, sizeof(DPM_Ports[PortNum]));
    break;
  }
}