generate event on Control Endpoint

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

cross mob
Anonymous
Not applicable

Hi,

   

Im trying to send an event througth the control endpoint doing:

   

        CCyControlEndPoint *ept = USBDevice->ControlEndPt;
        ept->Target = TGT_DEVICE;
        ept->ReqType = REQ_VENDOR;
        ept->Direction = DIR_TO_DEVICE;
        ept->ReqCode = 0x07;
        ept->Value = 1;
        ept->Index = 0;
        unsigned char buf[128];
        ZeroMemory(buf, 128);
        LONG buflen = 128;

   

       ept->Write(buf, buflen);

   

but the result is that the Write return false.

   

And the callback in the USBEventCB do not receive ani trigger.

   

How I have to change my application or firmware to generate/catch this event

   

Thanks in advance,

   

Athos

0 Likes
2 Replies
Anonymous
Not applicable

Sorry I was not realy clear in the first post.

   

I'm trying to send a vendor specific command from my host application to the FX3 device.

   

Thanks again

   

Athos

0 Likes
LiMa_282146
Level 4
Level 4
First like given

Hi,

   

You will need to add code to your firmware to catch the vendor request. See post http://www.cypress.com/?app=forum&id=167&rID=53345 for some example code

   

You will have to change the vendor request  in this example from 0xB1 to 0x07 - (your request) and to update the size of the endpoint buffer in the example to 128.

   

Sodafarl

0 Likes