/* Write USB Device Endpoint Data Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir pData: Pointer to Data Buffer cnt: Number of bytes to write Return Value: Number of bytes written  */
uint32_t USBD_WriteEP(uint32_t EPNum, uint8_t *pData, uint32_t cnt)
/* Write USB Device Endpoint Data Parameters: EPNum: Device Endpoint Number EPNum.0..3: Address EPNum.7: Dir pData: Pointer to Data Buffer cnt: Number of bytes to write Return Value: Number of bytes written  */
uint32_t USBD_WriteEP(uint32_t EPNum, uint8_t *pData, uint32_t cnt)
{
    return (cnt);
  }
  if (UDPHS->UDPHS_EPT[EPNum].UDPHS_EPTSTA & (0x1 << 11)) {
    return (0);
  }
  pEPFIFO = (uint8_t *)((uint32_t *)UDPHS_EPTFIFO_BASE + (16384*EPNum));
  for (n = 0; n < cnt; n++) {
    *pEPFIFO++ = *pData++;
  }
  UDPHS->UDPHS_EPT[EPNum].UDPHS_EPTSETSTA = (0x1 << 11);
  return (cnt);
}