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