/* Callback function called by PE to inform DPM about PE event.  */
void USBPD_DPM_Notification(uint8_t PortNum, USBPD_NotifyEventValue_TypeDef EventVal)
/* Callback function called by PE to inform DPM about PE event.  */
void USBPD_DPM_Notification(uint8_t PortNum, USBPD_NotifyEventValue_TypeDef EventVal)
{
  switch(EventVal)
  {
    case USBPD_NOTIFY_POWER_EXPLICIT_CONTRACT :
      if (USBPD_PORTDATAROLE_DFP == DPM_Params[PortNum].PE_DataRole)
      {
        USBPD_PE_SVDM_RequestIdentity(PortNum, USBPD_SOPTYPE_SOP);
      }
      Led_Set((PortNum == USBPD_PORT_0 ? LED_PORT0_VBUS : LED_PORT1_VBUS) , LED_MODE_ON, 0);
      break;
    case USBPD_NOTIFY_HARDRESET_RX:
    case USBPD_NOTIFY_HARDRESET_TX:
      if (USBPD_PORTPOWERROLE_SNK == DPM_Params[PortNum].PE_PowerRole)
      {
          USBPD_VDM_UserReset(PortNum);
      }
      break;
    case USBPD_NOTIFY_STATE_SRC_DISABLED:
      {
      }
      break;
    default :
      break;
  }
}