/* Copy a buffer from user memory area to packet memory area (PMA)  */
void USB_CopyPMAToUserBuf(uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes)
/* Copy a buffer from user memory area to packet memory area (PMA)  */
void USB_CopyPMAToUserBuf(uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes)
{
    uint32_t n = (wNBytes + 1) >> 1;
    uint32_t i;
    uint32_t* pdwVal;
    pdwVal = (uint32_t*)(wPMABufAddr * 2 + PMAAddr);
    for (i = n; i != 0; i--)
    {
        *(uint16_t*)pbUsrBuf++ = *pdwVal++;
        pbUsrBuf++;
        EpOutDataPtrTmp = pbUsrBuf;
    }
}