How to modify macro definition in header file

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

cross mob
Leo_liu1
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi,

If can I modify macro definition in header file?

Such as #define CapSense_CSD_RAWCOUNT_CAL_LEVEL       (85u)  in Capsense_configuration.h

If I changed 85 to 60 ,when project was built,the value would recover to 85.

So,we couldn't modify macro definition in header file,is it?

Thanks!

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello LeLi_3670906

These are the Generated source files which are obtained by setting parameters in the component. It is not recommended to change these files.

You can instead, call the CapSense_CSDCalibrateWidget API and specify the target percent as parameter to change the auto-calibration percent.
You can also find these variables set in the expression view of the component. To do so, in PSoC Creator, go to Tools > Options > Design Entry > Component Catalog and make sure "Enable Param Edit Views" is enabled.

pastedImage_0.png

Then, you can go to the CapSense configurator and right click on advanced tab and get Expression view where you will see the options for all CapSense configuration.

pastedImage_1.png

pastedImage_2.png

The generated source files pulls data from here only and modifying this will result in the actual values being modified.

Thanks,
Hari

View solution in original post

2 Replies
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello LeLi_3670906

These are the Generated source files which are obtained by setting parameters in the component. It is not recommended to change these files.

You can instead, call the CapSense_CSDCalibrateWidget API and specify the target percent as parameter to change the auto-calibration percent.
You can also find these variables set in the expression view of the component. To do so, in PSoC Creator, go to Tools > Options > Design Entry > Component Catalog and make sure "Enable Param Edit Views" is enabled.

pastedImage_0.png

Then, you can go to the CapSense configurator and right click on advanced tab and get Expression view where you will see the options for all CapSense configuration.

pastedImage_1.png

pastedImage_2.png

The generated source files pulls data from here only and modifying this will result in the actual values being modified.

Thanks,
Hari

Leo_liu1
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi Hari,

Got it,thanks!

0 Likes