/* Read USB Device Endpoint Data Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir pData: Pointer to Data Buffer Return Value: Number of bytes read  */
uint32_t USBD_ReadEP(uint32_t EPNum, uint8_t *pData)
/* Read USB Device Endpoint Data Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir pData: Pointer to Data Buffer Return Value: Number of bytes read  */
uint32_t USBD_ReadEP(uint32_t EPNum, uint8_t *pData)
{
    *pData++ = *pEPFIFO++;
  }
  UDPHS->UDPHS_EPT[EPNum].UDPHS_EPTCLRSTA = (0x1 << 9);
  UDPHS->UDPHS_EPT[EPNum].UDPHS_EPTCLRSTA = (0x1 << 12);
  UDPHS->UDPHS_IEN |= (1 << (EPNum + 8));
  return (cnt);
}