Doubt about CYPAI

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Ascs_4819156
Level 3
Level 3
10 replies posted 10 sign-ins 5 replies posted

Dear sir,

When I was learning and using the CYAPI library, I found a problem.

About BeginDataXfer and FinishDataXfer. In these 2 functions, they all need a buffer paramemter.

So I checked the source code. In BeginDataXfer function, the buffer will be memcpy into pXmitBuf.

And in FinishDataXfer, the buffer will be memcpy out from pXmitBuf.

So why do we need such a weird repetitive operation?

Thanks

Chad

0 Likes
1 Solution
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Chad

Buffer is not copied to pXmitBuf, but after pXmitBuf. Please refer to CyUSB.sys Programmers Reference Pg No. 21 under "IOCTL_ADAPT_SEND_NON_EP0_TRANSFER".

Best Regards,
AliAsgar

View solution in original post

0 Likes
1 Reply
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Chad

Buffer is not copied to pXmitBuf, but after pXmitBuf. Please refer to CyUSB.sys Programmers Reference Pg No. 21 under "IOCTL_ADAPT_SEND_NON_EP0_TRANSFER".

Best Regards,
AliAsgar

0 Likes