1 of 1 people found this helpful
What I know so far is that there is no specific API to access the diff-count for each buttons.
But you can get the diff-count by directly accessing the each variables.
For example, the diff-count of button0 is saved in CapSense_dsRam.snsList.button0[0u].diff variable and you can read it directly. Or there is a definition of CapSense_BUTTON0_SNS0_DIFF_VALUE for pointing out the same variable.
If I found the better way, I will let you know.
You can also access as follows:
const CapSense_FLASH_STRUCT *ptrSnsFlash;
ptrSnsFlash = &CapSense_dsFlash;
uint32 widgetId = 0 ;
uint32 sensorId = 0 ;
for(widgetId = 0; widgetId < CapSense_TOTAL_WIDGETS; widgetId++)
for(sensorId = 0; sensorId < ptrSnsFlash->wdgtArray[widgetId].totalNumSns; sensorId++)
diff = ptrSnsFlash->wdgtArray[widgetId].ptr2SnsRam->raw[sensorId];
The definition 'CapSense_BUTTON0_SNS0_DIFF_VALUE' is defined in 'CapSense_RegisterMap.h' and CapSense_dsRam is in 'CapSense_Structure.h' and 'CapSense_Structure.c'.
To use that, you may include 'project.h'.
Please try to include that header file.
yes, project.h is already included,
as I use CapSense with ADC, I think I should change as follow:
counts = CapSense_ADC_BUTTON0_SNS0_DIFF_VALUE; //
Edit: just tried out => that works :-), thank you very much!
Please upload your project. I will try with your project.
see above, it works now :-) - thank you for your support