2 Replies Latest reply on Jun 10, 2020 2:31 AM by LeLi_3670906

    How to modify macro definition in header file

    LeLi_3670906

      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!

        • 1. Re: How to modify macro definition in header file
          AH_96

          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.

           

          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.

           

           

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

           

          Thanks,
          Hari

          1 of 1 people found this helpful
          • 2. Re: How to modify macro definition in header file
            LeLi_3670906

            Hi Hari,

             

            Got it,thanks!