cancel
Showing results for 
Search instead for 
Did you mean: 

USB Library - mem.c

luca239955_stm1
Associate II
Posted on June 15, 2006 at 13:12

USB Library - mem.c

1 REPLY 1
luca239955_stm1
Associate II
Posted on June 15, 2006 at 13:12

I had to modify the UserToPMABufferCopy in mem.c because it blocked the application when i tryed to send odd dimension buffers.

Was it caused by a my mistake or by a mistake of the library?

This is the new function.

void UserToPMABufferCopy(BYTE *pbUsrBuf,WORD wPMABufAddr, WORD wNBytes)

{

BYTE *pbVal,*pEnd;

if((wNBytes) == 0) return;

pbVal = (BYTE*)(wPMABufAddr*2 + PMAAddr);

pEnd = pbVal + wNBytes;

do{

*pbVal = *pbUsrBuf;

pbVal++;

pbUsrBuf++;

}while(pbVal != pEnd);

}

thank you for your attention

crbit