- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Cypress.
I would like to scan only some capsense widgets of all widgets.
Attached project has 5 capsense widgets.
I would like to scan only 2 widgets of button0 and button4.
But only button4 can scan in this project.
Button0 did not scan.
I used CY8CKIT-145-40xx.
How should attached project be modified?
Best Regards.
Yutaka Matsubara.
Solved! Go to Solution.
- Labels:
-
ispn:40040:1:0
-
l1:314:1:0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YuMa_1534086,
If you call the API CapSense_SetupWidget(); multiple times (one after the other), then only the widget that is setup last is scanned. For example, in your case, you are setting up the button 4 at last, that is why you see that only button 4 is scanned.
The correct sequence is :
1. Set up the widget to be scanned using CapSense_SetupWidget();
2. Start the scan using CapSense_Scan();
3. Wait for scan to complete using CapSense_IsBusy();
4. Process the scanned widget using CapSense_ProcessWidget();
5. Increment/ Change the widgetID to next widget to be scanned.
6. Go to step 1.
For example, you can do the following:
widgetID = 0;
CapSense_Start();
CapSense_SetupWidget(widgetID);
CapSense_Scan();
if(CapSense_NOT_BUSY == CapSense_IsBusy())
{
CapSense_ProcessWidget(widgetID);
if(CapSense_IsAnyWidgetActive())
{ //Application
}
widgetID ++; // Or the next widget you want to scan.
if(widgetID > maxWidgetID) // Based on your application
{
widgetID = 0;
}
CapSense_SetupWidget(widgetID);
CapSense_Scan();
}
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YuMa_1534086,
If you call the API CapSense_SetupWidget(); multiple times (one after the other), then only the widget that is setup last is scanned. For example, in your case, you are setting up the button 4 at last, that is why you see that only button 4 is scanned.
The correct sequence is :
1. Set up the widget to be scanned using CapSense_SetupWidget();
2. Start the scan using CapSense_Scan();
3. Wait for scan to complete using CapSense_IsBusy();
4. Process the scanned widget using CapSense_ProcessWidget();
5. Increment/ Change the widgetID to next widget to be scanned.
6. Go to step 1.
For example, you can do the following:
widgetID = 0;
CapSense_Start();
CapSense_SetupWidget(widgetID);
CapSense_Scan();
if(CapSense_NOT_BUSY == CapSense_IsBusy())
{
CapSense_ProcessWidget(widgetID);
if(CapSense_IsAnyWidgetActive())
{ //Application
}
widgetID ++; // Or the next widget you want to scan.
if(widgetID > maxWidgetID) // Based on your application
{
widgetID = 0;
}
CapSense_SetupWidget(widgetID);
CapSense_Scan();
}
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bragadeesh-san.
Thank you for your answer.
I understand.
Best Regards.
Yutaka Matsubara