Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
Sanket24
Level 2
Level 2
5 questions asked 10 replies posted 25 sign-ins

Hello All,

I am Sanket more. Currently i am working on USB-HID TOUCHPAD.

I am using CY8C4246AZI-L445 without gesture.

I want to get single click and double click using touchpad and send all data to usb.

If anyone have positive outcome on this,so then please reply back.

Thanks and regards,

Sanket More  

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

I use the below codes to achieve the mouse double click.

mouseData[0] = 0x0A;//right click
while (0u == USBFS_GetEPAckState(MOUSE_ENDPOINT))
{
}

/* Load endpoint with data after ACK has been received. */
USBFS_LoadInEP(MOUSE_ENDPOINT, mouseData, MOUSE_DATA_LEN);
CyDelay(100);

mouseData[0] = 0x08;//release
/* Wait for ACK before loading data. */
while (0u == USBFS_GetEPAckState(MOUSE_ENDPOINT))
{
}
/* Load endpoint with data after ACK has been received. */
USBFS_LoadInEP(MOUSE_ENDPOINT, mouseData, MOUSE_DATA_LEN);
mouseData[0] = 0x0A;//right click
while (0u == USBFS_GetEPAckState(MOUSE_ENDPOINT))
{
}

/* Load endpoint with data after ACK has been received. */
USBFS_LoadInEP(MOUSE_ENDPOINT, mouseData, MOUSE_DATA_LEN);
CyDelay(100);

I attached my test project, which the Button 0.6 active, the right click will double click. If you have other custom application, please design the code depending on your requirement.

View solution in original post

0 Likes
5 Replies
lock attach
Attachments are accessible only for community members.
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

I have a test project which can use a button to control the mouse move from right to left.

Please check if you want, if you need to distinguish between  signal click and double click, you can add the logic based on the project.

0 Likes
Sanket24
Level 2
Level 2
5 questions asked 10 replies posted 25 sign-ins

Thanks for support,

But i am trying to take left click and right click using touchpad sense(by single click and double click). here main motive to take sense from touchpad. i already take attempts using button it is working.

i am looking for reply,

 

thanks and regards,

sanket more

0 Likes
lock attach
Attachments are accessible only for community members.

I use the below codes to achieve the mouse double click.

mouseData[0] = 0x0A;//right click
while (0u == USBFS_GetEPAckState(MOUSE_ENDPOINT))
{
}

/* Load endpoint with data after ACK has been received. */
USBFS_LoadInEP(MOUSE_ENDPOINT, mouseData, MOUSE_DATA_LEN);
CyDelay(100);

mouseData[0] = 0x08;//release
/* Wait for ACK before loading data. */
while (0u == USBFS_GetEPAckState(MOUSE_ENDPOINT))
{
}
/* Load endpoint with data after ACK has been received. */
USBFS_LoadInEP(MOUSE_ENDPOINT, mouseData, MOUSE_DATA_LEN);
mouseData[0] = 0x0A;//right click
while (0u == USBFS_GetEPAckState(MOUSE_ENDPOINT))
{
}

/* Load endpoint with data after ACK has been received. */
USBFS_LoadInEP(MOUSE_ENDPOINT, mouseData, MOUSE_DATA_LEN);
CyDelay(100);

I attached my test project, which the Button 0.6 active, the right click will double click. If you have other custom application, please design the code depending on your requirement.

0 Likes
Sanket24
Level 2
Level 2
5 questions asked 10 replies posted 25 sign-ins

Hello Sir,

I understand and implemented it. it is working fine.

but i want to take action from touchpad sense without gesture. All cursor movement on touchpad, single click and right click on button working good.

But i am trying to take single click and double click on touchpad not on button. This is my major task related to touchpads. please any positive comes always welcome.

Thanks and regards,

Sanket More

0 Likes

I think the button and touchpad is similar.

I think we only can help you if you meet some difficulty.

You can tell us what you have try and what difficulty you meet, we can help you.

More about the capsense touchpad, please refer to the below linkers:

1:

https://www.infineon.com/dgdl/Infineon-AN85951_PSoC_4_and_PSoC_6_MCU_CapSense_Design_Guide-Applicati...

2:

https://www.infineon.com/dgdl/Infineon-AN64846_Getting_Started_with_CapSense-ApplicationNotes-v27_00...

 

 

0 Likes