13 Sep 2007 12:16
Re: Unable (to (sends?)/recive from bulks endpoint.
Emanuele Maiarelli <emanuele <at> nettirrena.it>
2007-09-13 10:16:14 GMT
2007-09-13 10:16:14 GMT
i've tried all solutions, but things dosen't change.
This is the the pice C of code on usb device handling EP1 (Cypres FX2LP):
...
if(!(EP1OUTCS & bmBIT1))
{
char cmdbuff[10];
int cmdsize=0;
int i;
int bitcount= EP1OUTBC;
BOOL stc=FALSE;
BOOL done=FALSE;
int c=0;
while ((c<bitcount) && cmdsize<10 && (!(done)))
{
if ((stc) && (EP1OUTBUF[c]!=0x03))
cmdbuff[cmdsize++]=EP1OUTBUF[c];
if (EP1OUTBUF[c]==0x02) stc=TRUE;
if (EP1OUTBUF[c]==0x03) done=TRUE;
c++;
}
if (cmdsize>0)
{
if ((cmdbuff[0]=='S') && (cmdbuff[1]=='N'))
{
EP1INBUF[0]=0x02;
for (i=0;i<9;i++)
{
EP1INBUF[1+i]=_SNO[i];
}
(Continue reading)
RSS Feed