Cy_CapSense_IsAnyWidgetActive is right?

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

cross mob
riccardo-monty
Level 3
Level 3
50 sign-ins 10 replies posted First like received

In the following

capsense middleware 

the function:

uint32_t Cy_CapSense_IsAnyWidgetActive(const cy_stc_capsense_context_t * context)

returned result is always at maximum one widget, cause the CY_CAPSENSE_WD_ACTIVE_MASK define.
Is right? because on previous libraries, with PsocCreator Components, this function can returned all widgets mask

0 Likes
1 Solution

Hi @riccardo-monty 

You are correct; However, the API is for telling whether or not any widget out of all the widgets, is active. More like Yes or No. We will work internally to update the API description.

 

Returns the touch detection status of all the widgets:

  • Zero - No touch is detected in any of the widgets or sensors.
  • Non-zero - At least one widget or sensor has detected a touch.

Non-Zero, all the widgets could be creating the confusion here.

 

Thanks!
Kind Regards

Arpit Srivastav

 

View solution in original post

0 Likes
3 Replies
Arpit_S
Moderator
Moderator
Moderator
50 likes received 250 replies posted 100 solutions authored

Hi @riccardo-monty ,

Can you please guide which ModusToolbox version are you using? In the meantime, I'll go through the documentation and will try to replicate the issue at my end.

 

Thanks!

Kind regards

Arpit Srivastav

0 Likes

I'm using ModusToolbox 3.0.

what I'm expecting from that istruction is this:

capStatus |= (((uint32)(cy_capsense_context.ptrWdContext[wdIndex].status & CY_CAPSENSE_WD_ACTIVE_MASK)) << wdIndex);

but the bit left-shift is missing

0 Likes

Hi @riccardo-monty 

You are correct; However, the API is for telling whether or not any widget out of all the widgets, is active. More like Yes or No. We will work internally to update the API description.

 

Returns the touch detection status of all the widgets:

  • Zero - No touch is detected in any of the widgets or sensors.
  • Non-zero - At least one widget or sensor has detected a touch.

Non-Zero, all the widgets could be creating the confusion here.

 

Thanks!
Kind Regards

Arpit Srivastav

 

0 Likes