Modify the CapSense threshold in program

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

cross mob
Anonymous
Not applicable

Now I am developing two models with CapSense feature. These two models share same source code. But the CapSense sensitivity is different. So I want to define different thresholds according to macro definition. I find the thresholds are const type.

   

const uint16 CapSense_fingerThreshold[] = {
    40u, 40u, 30u, 60u, 800u, 
};

   

So I modify the source code like this. So I can redefine the threshold.

   

const uint16 __attribute__((weak)) CapSense_fingerThreshold[] = {
    40u, 40u, 30u, 60u, 800u, 
};

   

So I can redefine the threshold.

   

#ifndef MYLAR_COVER
const uint16 CapSense_fingerThreshold[] = {
    60u, 60u, 60u, 90u, 800u, 
};
#endif

   

So I suggest Cypress to improve the PSoC creator. So that it could generate the source code with weak attribute.

0 Likes
1 Reply
Anonymous
Not applicable

Hello Dong Chen,

   

Thank you for informing this.

   

Thanks

   

Ramesh B

0 Likes