/* 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 :
      Led_Set((PortNum == USBPD_PORT_0 ? LED_PORT0_VBUS : LED_PORT1_VBUS) , LED_MODE_ON, 0);
      break;
    case USBPD_NOTIFY_REQUEST_ACCEPTED:
      if (USBPD_PORTPOWERROLE_SNK == DPM_Params[PortNum].PE_PowerRole)
      {
        USBPD_SNKRDO_TypeDef rdo;
        rdo.d32                             = DPM_Ports[PortNum].DPM_RequestDOMsg;
        DPM_Ports[PortNum].DPM_RDOPosition  = rdo.GenericRDO.ObjectPosition;
      }
    break;
    case USBPD_NOTIFY_STATE_SNK_READY:
      {
      }
      break;
    case USBPD_NOTIFY_STATE_SRC_DISABLED:
      {
      }
      break;
    default :
      break;
  }
}