Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > CyUSB.Net HID ReadInput problem

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



CyUSB.Net HID ReadInput problem
Moderator:
RSKV

Post Reply
Follow this topic



CyUSB.Net HID ReadInput problem

Vytautas2 posted on 04 Jun 2012 7:38 AM PST
Top Contributor
36 Forum Posts

Hi,

I try to read data from HID device using ReadInput in timer (50ms, 300ms, ...) like this:

System::Void read_timer_Tick(System::Object^  sender, System::EventArgs^  e)

{

if (hidDevice == nullptr) return;

if (hidDevice->ReadInput())

//if (hidDevice->GetInput(hidDevice->Inputs->ID))

{

}
}
 
The problem is that ReadInput causes abnormal slow down of the application: window resizing, text entering to textbox and so on. CPU usage (including kernel) is less than 5 percents. ReadInput returns data buffer, but is very slow.
Another problem is that GetInput does not return any data (returns with false).
Used suite version is CySuiteUSB_3_4_7_B204.exe.
Thanks for any help.
 




Re: CyUSB.Net HID ReadInput problem

PRJI posted on 06 Jun 2012 06:18 AM PST
Cypress Employee
333 Forum Posts

 Hi,

    Which endpoints are you interacting with Getinput and Readinput APIs ?. ReadInput will hang indefinitely if the device does not have an Input report ready to be read.

Thanks

Prajith

   



Re: CyUSB.Net HID ReadInput problem

Vytautas2 posted on 06 Jun 2012 07:37 AM PST
Top Contributor
36 Forum Posts

I simply call function of CyHidDevice, but most likely it was implemented assuming that it will be used in some other way, but at this moment it is unclear how it should be used.



Re: CyUSB.Net HID ReadInput problem

PRJI posted on 07 Jun 2012 12:47 AM PST
Cypress Employee
333 Forum Posts

 Hi,

Using ReadInput( ) you should be able to communicate with the non-Control endpoint. GetInput( ) API is for Control endpoit.

 

Thanks

Prajith






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.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20