CapSense Data Structure¶
The CapSense Data Structure organizes configuration parameters, input, and output data shared among different FW modules within the CapSense.
The key responsibilities of the Data Structure are as follows:
The Data Structure is the only data container in the CapSense middleware.
It serves as storage for the configuration and the output data.
All CapSense modules use the data structure for the communication and data exchange.
The CapSense Data Structure is a composite of several smaller structures (for global / common data, widget data, sensor data, and pin data). Furthermore, the data is split between RAM and Flash to achieve a reasonable balance between resources consumption and configuration / tuning flexibility at runtime and compile time. A graphical representation of the CapSense Data Structure is shown below.
Note that figure below shows a sample representation and documents the high-level design of the data structure, it does not include all the parameters and elements in each object.
CapSense Data Structure does not perform error checking on the data written to CapSense Data Structure. It is the responsibility of application program to ensure register map rule are not violated while modifying the value of data field in CapSense Data Structure.