Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > generate event on Control Endpoint

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



generate event on Control Endpoint
Moderator:
RSKV

Post Reply
Follow this topic



generate event on Control Endpoint

Aghi posted on 09 Sep 2011 2:07 AM PST
Senior Member
11 Forum Posts

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

 




Re: generate event on Control Endpoint

Aghi posted on 09 Sep 2011 02:22 AM PST
Senior Member
11 Forum Posts

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



Re: generate event on Control Endpoint

sodafarl posted on 28 Sep 2011 09:56 PM PST
Top Contributor
128 Forum Posts

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






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.