CY8CKIT-040 PSoC
®
4000 Pioneer Kit Guide, Doc. # 001-91316 Rev. *F
63
Code Examples
provides a quick reference to some key CapSense Component variables/arrays.
Table 5-4. CapSense Component Key Variables
Variable/Array Name
Description
Usage
uint16 CapSense_Sen-
sorRaw[]
This array contains the raw data for each sensor.
The array size is equal to the total number of sen-
sors (CapSense_TOTAL_SENSOR_COUNT).
The CapSense_SensorRaw [ ] data is updated by
these functions:
• CapSense_ScanSensor()
• CapSense_ScanEnabledWidgets()
•CapSense_InitializeSensorBaseline()
• CapSense_InitializeAllBaselines()
• CapSense_UpdateEnabledBaselines()
The variable can be accessed in
any file by importing it using
‘extern uint16 CapSense_Sen-
sorRaw[];’ in the ‘.c’ or ‘.h’ file.
It is recommended not to alter
the arrays manually.
uint16 CapSense_Sen-
sorBaseline[]
This array holds the baseline data of each sensor.
The historical count value, calculated inde-
pendently for each sensor is called the sensor's
baseline. The array’s size is equal to the total
number of sensors. The CapSense_SensorBase-
line[ ] array is updated by these functions:
• CapSense_InitializeSensorBaseline()
• CapSense_InitializeAllBaselines()
• CapSense_UpdateSensorBaseline()
• CapSense_UpdateEnabledBaselines().
The variable can be accessed in
any file by importing it using
‘extern uint16 CapSense_Sen-
sorBaseline[];’ in the ‘.c’ or ‘.h’
file.
It is recommended not to alter
the arrays manually.
uint8 CapSense_Sen-
sorSignal[]
This array holds the sensor signal count com-
puted by subtracting the previous baseline from
the current raw count of each sensor. Each array
element corresponding to a sensor will have the
difference value only if the value is above the
noise threshold of the sensor. Otherwise, it will be
0. The array size is equal to the total number of
sensors. The CapSense_SensorSignal[ ] array is
updated by these functions:
• CapSense_InitializeSensorBaseline()
• CapSense_InitializeAllBaselines()
• CapSense_UpdateSensorBaseline()
• CapSense_UpdateEnabledBaselines().
The variable can be accessed in
any file by importing it using
‘extern uint8 CapSense_Sensor-
Signal[];’ in the ‘.c’ or ‘.h’ file.
It is recommended not to alter
the arrays manually.
Содержание CY8CKIT-040 PSoC 4000 Pioneer Kit
Страница 20: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 20 Kit Operation...
Страница 37: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 37 Hardware...
Страница 73: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 73 Code Examples Raw count and Baseline...