-
Notifications
You must be signed in to change notification settings - Fork 4
/
cy_capsense_lib.h
679 lines (632 loc) · 31.6 KB
/
cy_capsense_lib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
/***************************************************************************//**
* \file cy_capsense_lib.h
* \version 5.0
*
* \brief
* The file contains application programming interface to the CAPSENSE™ library.
*
********************************************************************************
* \copyright
* Copyright 2018-2024, Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
* You may use this file only in accordance with the license, terms, conditions,
* disclaimers, and limitations in the end user license agreement accompanying
* the software package with which this file was provided.
*******************************************************************************/
#if !defined(CY_CAPSENSE_LIB_H)
#define CY_CAPSENSE_LIB_H
#include "cy_syslib.h"
#if defined(__cplusplus)
extern "C" {
#endif
/*******************************************************************************
* Public definitions
*******************************************************************************/
/******************************************************************************/
/** \addtogroup group_capsense_macros_touch *//** \{ */
/******************************************************************************/
/** No touch detected */
#define CY_CAPSENSE_ADVANCED_CENTROID_NO_TOUCHES (0x00u)
/** An error in touch calculation or number of detected touches is above supported touches */
#define CY_CAPSENSE_ADVANCED_CENTROID_POSITION_ERROR (0xFFu)
/** \} */
/*******************************************************************************
* Structures
*******************************************************************************/
/******************************************************************************/
/** \addtogroup group_capsense_structures *//** \{ */
/******************************************************************************/
/** Declares Adaptive Filter configuration parameters */
typedef struct
{
uint8_t maxK; /**< Maximum filter coefficient */
uint8_t minK; /**< Minimum filter coefficient */
uint8_t noMovTh; /**< No-movement threshold */
uint8_t littleMovTh; /**< Little movement threshold */
uint8_t largeMovTh; /**< Large movement threshold */
uint8_t divVal; /**< Divisor value */
uint8_t reserved0; /**< Reserved field */
uint8_t reserved1; /**< Reserved field */
} cy_stc_capsense_adaptive_filter_config_t;
/** Declares Advanced Centroid configuration parameters */
typedef struct
{
uint16_t fingerTh; /**< Finger threshold of widget */
uint16_t penultimateTh; /**< Penultimate threshold */
uint16_t virtualSnsTh; /**< Virtual sensor threshold */
uint16_t resolutionX; /**< X axis maximum position */
uint16_t resolutionY; /**< Y axis maximum position */
uint8_t crossCouplingTh; /**< Cross-coupling threshold */
uint8_t snsCountX; /**< Number of segments on X axis */
uint8_t snsCountY; /**< Number of segments on Y axis */
uint8_t edgeCorrectionEn; /**< Edge correction enabled */
uint8_t twoFingersEn; /**< Two-finger detection enabled */
} cy_stc_capsense_advanced_centroid_config_t;
/** Declares position structure that keep information of a single touch.
* Depending on a widget type each structure field keeps the following
* information:
*
* <table class="doxtable">
* <tr>
* <th>Structure Field</th>
* <th>Slider</th>
* <th>Matrix Buttons</th>
* <th>CSD Touchpad</th>
* <th>CSX Touchpad</th>
* </tr>
* <tr>
* <td>x</td>
* <td>X-axis position</td>
* <td>Active Column</td>
* <td>X-axis position</td>
* <td>X-axis position</td>
* </tr>
* <tr>
* <td>y</td>
* <td>Reserved</td>
* <td>Active Row</td>
* <td>Y-axis position</td>
* <td>Y-axis position</td>
* </tr>
* <tr>
* <td>z</td>
* <td>Reserved</td>
* <td>Reserved</td>
* <td>Reserved</td>
* <td>MSB = Age of touch; LSB = Z-value represents a touch strength (summ of sensor diff counts divided by 16
* that form 3x3 matrix with a local maximum in the center). It is not used by Middleware, however can be
* re-used by users to define a touch shape or a finger size.</td>
* </tr>
* <tr>
* <td>id</td>
* <td>Reserved</td>
* <td>Logical number of button</td>
* <td>Reserved</td>
* <td>MSB = Debounce; LSB = touch ID</td>
* </tr>
* </table>
*/
typedef struct
{
uint16_t x; /**< X position */
uint16_t y; /**< Y position */
uint16_t z; /**< Z value */
uint16_t id; /**< ID of touch */
} cy_stc_capsense_position_t;
/** Declares touch structure used to store positions of Touchpad, Matrix buttons and Slider widgets */
typedef struct
{
cy_stc_capsense_position_t * ptrPosition; /**< Pointer to the array containing the position information.
A number of elements is defined by numPosition. */
uint8_t numPosition; /**< Total number of detected touches on a widget:
* * 0 - no touch is detected
* * 1 - a single touch is detected
* * 2 - two touches are detected
* * 3 - three touches are detected
* * CY_CAPSENSE_POSITION_MULTIPLE - multiple touches are detected
* and information in position structure should be ignored.
*
* The below table specifies a number of touches could be reported for a specific widget.
* <table class="doxtable">
* <tr>
* <th colspan="2">CAPSENSE</th>
* <th colspan="5">Number of positions</th>
* </tr>
* <tr align="center">
* <td>Sensing method</td>
* <td>Widget type</td>
* <td>0</td>
* <td>1</td>
* <td>2</td>
* <td>  3  </td>
* <td>Multiple</td>
* </tr>
* <tr align="center">
* <td rowspan="6">CSD</td>
* <td>Button</td>
* <td rowspan="10"> No touch  <br>  detected </td>
* <td colspan="3">Number of active sensors <br> (up to number of sensors)</td>
* <td>N/A</td>
* </tr>
* <tr align="center">
* <td>Matrix button</td>
* <td>Single touch <br> detected</td>
* <td>N/A</td>
* <td>N/A</td>
* <td>Multiple touches <br> detected</td>
* </tr>
* <tr align="center">
* <td>Linear slider</td>
* <td>Single touch <br> detected</td>
* <td>N/A</td>
* <td>N/A</td>
* <td>N/A</td>
* </tr>
* <tr align="center">
* <td>Radial slider</td>
* <td>Single touch <br> detected</td>
* <td>N/A</td>
* <td>N/A</td>
* <td>N/A</td>
* </tr>
* <tr align="center">
* <td>Touchpad</td>
* <td>Single touch <br> detected</td>
* <td>Two touches <br> detected</td>
* <td>N/A</td>
* <td>Multiple touches <br> detected</td>
* </tr>
* <tr align="center">
* <td>Proximity</td>
* <td colspan="3">Number of active sensors <br> (up to number of sensors)</td>
* <td>N/A</td>
* </tr>
* <tr align="center">
* <td rowspan="4">CSX</td>
* <td>Button</td>
* <td colspan="3">Number of active sensors <br> (up to number of sensors)</td>
* <td>N/A</td>
* </tr>
* <tr align="center">
* <td>Matrix button</td>
* <td colspan="3">Number of active sensors <br> (up to number of sensors)</td>
* <td>N/A</td>
* </tr>
* <tr align="center">
* <td>Linear slider</td>
* <td>Single touch <br> detected</td>
* <td>N/A</td>
* <td>N/A</td>
* <td>N/A</td>
* </tr>
* <tr align="center">
* <td>Touchpad</td>
* <td colspan="3">Number of touches <br> (up to 3)</td>
* <td>N/A</td>
* </tr>
* </table>
*/
} cy_stc_capsense_touch_t;
/** Declares HW smart sensing algorithm data structure for CSD widgets for fourth-generation CAPSENSE™ */
typedef struct
{
uint32_t sensorCap; /**< Sensor parasitic capacitance in fF 10^-15 */
uint32_t iDacGain; /**< IDAC gain in pA */
uint16_t * ptrSenseClk; /**< Pointer to SnsClk divider */
uint16_t * sigPFC; /**< Pointer to sigPFC value (75% of Signal Per Finger Capacitance) */
uint16_t snsClkConstantR; /**< Resistance in series to a sensor */
uint16_t vRef; /**< Vref in mVolts */
uint16_t fingerCap; /**< Finger capacitance in fF 10^-15 (Set in Basic tab in pF 10^-12) */
uint16_t snsClkInputClock; /**< Frequency for sense clock divider in kHz */
uint16_t calTarget; /**< Calibration target in percentage */
uint8_t iDacMod; /**< Modulation idac code */
uint8_t iDacComp; /**< Compensation idac code */
} cy_stc_capsense_auto_tune_config_t;
/** Declares HW smart sensing algorithm data structure for CSD widgets for fifth-generation CAPSENSE™ */
typedef struct
{
uint32_t snsCapacitance; /**< Sensor parasitic capacitance in fF 10^-15 */
uint32_t modClock; /**< Modulation clock frequency in Hz */
uint16_t nSub0; /**< Base number of sub-conversions */
uint16_t nSub1; /**< Final number of sub-conversions */
uint16_t raw; /**< Sensor raw counts */
uint16_t snsResistance; /**< Resistance in series to a sensor */
uint16_t kRef0; /**< Base sense frequency */
uint16_t kRef1; /**< Final sense frequency */
uint16_t fingerCap; /**< Finger capacitance in fF 10^-15 (Set in Basic tab in pF 10^-12) */
uint16_t sigPFC; /**< sigPFC value (75% of signal Per Finger Capacitance) */
uint8_t refCdac; /**< Reference CAP DAC code for getting capacitance and calibration target for getting Nsub */
uint8_t correctionCoeff; /**< Correction coefficient for CTRL_MUX mode */
} cy_stc_capsense_hw_smartsense_config_t;
/** Declares Noise envelope data structure for CSD widgets when smart sensing algorithm is enabled */
typedef struct
{
uint16_t param0; /**< Parameter 0 configuration */
uint16_t param1; /**< Parameter 1 configuration */
uint16_t param2; /**< Parameter 2 configuration */
uint16_t param3; /**< Parameter 3 configuration */
uint16_t param4; /**< Parameter 4 configuration */
uint8_t param5; /**< Parameter 5 configuration */
uint8_t param6; /**< Parameter 6 configuration */
} cy_stc_capsense_smartsense_csd_noise_envelope_t;
/** Declares Update Thresholds structure */
typedef struct
{
uint16_t fingerTh; /**< Widget finger threshold */
uint8_t noiseTh; /**< Widget noise threshold */
uint8_t nNoiseTh; /**< Widget negative noise threshold */
uint8_t hysteresis; /**< Widget hysteresis for the signal crossing finger threshold */
} cy_stc_capsense_smartsense_update_thresholds_t;
/** Declares Ballistics Multiplier Configuration data structure */
typedef struct
{
uint8_t accelCoeff; /**< Acceleration Coefficient */
uint8_t speedCoeff; /**< Speed Coefficient */
uint8_t divisorValue; /**< Divisor Value */
uint8_t speedThresholdX; /**< Speed Threshold X */
uint8_t speedThresholdY; /**< Speed Threshold Y */
uint8_t reserved0; /**< Reserved field */
uint8_t reserved1; /**< Reserved field */
uint8_t reserved2; /**< Reserved field */
} cy_stc_capsense_ballistic_config_t;
/** Declares Ballistics Multiplier Configuration data structure */
typedef struct
{
uint32_t currentTimestamp; /**< Current timestamp */
uint32_t oldTimestamp; /**< Previous timestamp */
int32_t deltaXfrac; /**< Fraction of X-axis displacement */
int32_t deltaYfrac; /**< Fraction of Y-axis displacement */
uint16_t x; /**< X-axis position */
uint16_t y; /**< Y-axis position */
uint8_t touchNumber; /**< Current number of touches */
uint8_t oldTouchNumber; /**< Previous number of touches */
uint8_t reserved0; /**< Reserved field */
uint8_t reserved1; /**< Reserved field */
} cy_stc_capsense_ballistic_context_t;
/** Declares Ballistic Displacement structure */
typedef struct
{
int16_t deltaX; /**< X-axis displacement */
int16_t deltaY; /**< Y-axis displacement */
} cy_stc_capsense_ballistic_delta_t;
/** \} */
/** Declares ALP filter data structure */
typedef struct
{
uint32_t dataParam0; /**< Parameter 0 context */
uint16_t dataParam1; /**< Parameter 1 context */
uint16_t dataParam2; /**< Parameter 2 context */
uint16_t dataParam3; /**< Parameter 3 context */
uint16_t dataParam4; /**< Parameter 4 context */
uint16_t dataParam5; /**< Parameter 5 context */
uint16_t dataParam6; /**< Parameter 6 context */
uint8_t dataParam7; /**< Parameter 7 context */
} cy_stc_capsense_alp_fltr_channel_t;
/** Declares ALP filter configuration structure */
typedef struct
{
uint16_t configParam0; /**< Parameter 0 configuration */
uint16_t configParam1; /**< Parameter 1 configuration */
uint16_t configParam2; /**< Parameter 2 configuration */
uint8_t configParam3; /**< Parameter 3 configuration */
uint8_t configParam4; /**< Parameter 4 configuration */
uint8_t configParam5; /**< Parameter 5 configuration */
} cy_stc_capsense_alp_fltr_config_t;
/*******************************************************************************
* Function Prototypes
*******************************************************************************/
/******************************************************************************/
/** \cond SECTION_CAPSENSE_INTERNAL */
/** \addtogroup group_capsense_internal *//** \{ */
/******************************************************************************/
/*******************************************************************************
* Function Name: Cy_CapSense_AdaptiveFilterInitialize_Lib
****************************************************************************//**
*
* Initializes the Adaptive Filter context structure by writing default
* adaptive coefficient for the AIIR filter.
*
* \param config
* The pointer to the configuration structure of the Adaptive Filter.
*
* \param context
* The pointer to the context structure of the Adaptive Filter.
*
*******************************************************************************/
void Cy_CapSense_AdaptiveFilterInitialize_Lib(
const cy_stc_capsense_adaptive_filter_config_t * config,
cy_stc_capsense_position_t * context);
/*******************************************************************************
* Function Name: Cy_CapSense_AdaptiveFilterRun_Lib
****************************************************************************//**
*
* This function runs the Adaptive Filter algorithm for the centroid position.
*
* The function supposes that the filter history is updated at first touch
* outside of the library. I.e. at the first touchdown the filter history has
* to be initialized by touch positions before calling this function.
*
* \param config
* The pointer to the configuration structure of the Adaptive Filter.
*
* \param context
* The pointer to the context structure of the Adaptive Filter.
*
* \param currentX
* The pointer to X position.
*
* \param currentY
* The pointer to Y position.
*
*******************************************************************************/
void Cy_CapSense_AdaptiveFilterRun_Lib(
const cy_stc_capsense_adaptive_filter_config_t * config,
cy_stc_capsense_position_t * context,
uint32_t * currentX,
uint32_t * currentY);
/*******************************************************************************
* Function Name: Cy_CapSense_AdvancedCentroidGetTouchCoordinates_Lib
****************************************************************************//**
*
* This API calculates the centroids for up to two fingers.
*
* \param config
* The pointer to the configuration structure of the Advanced Centroid.
*
* \param ptrSns
* The pointer to the array with sensor raw counts.
*
* \param touch
* The pointer to touch structure.
*
*******************************************************************************/
void Cy_CapSense_AdvancedCentroidGetTouchCoordinates_Lib(
const cy_stc_capsense_advanced_centroid_config_t * config,
const uint16_t * ptrSns,
cy_stc_capsense_touch_t * touch);
/*******************************************************************************
* Function Name: Cy_CapSense_BallisticMultiplier_Lib
****************************************************************************//**
*
* This function runs the ballistic multiplier.
*
* \param config
* The pointer to the configuration structure of the Advanced Centroid.
*
* \param touch
* The pointer to touch structure.
*
* \param displacement
* The pointer to position displacement
*
* \param timestamp
* The current timestamp
*
* \param context
* The pointer to the context structure of the Ballistic Multiplier.
*
*******************************************************************************/
void Cy_CapSense_BallisticMultiplier_Lib(
const cy_stc_capsense_ballistic_config_t * config,
const cy_stc_capsense_touch_t * touch,
cy_stc_capsense_ballistic_delta_t * displacement,
uint32_t timestamp,
cy_stc_capsense_ballistic_context_t * context);
/*******************************************************************************
* Function Name: Cy_CapSense_AlpRun_Lib
****************************************************************************//**
*
* Applies advanced low pass filter algorithm on raw counts.
*
* \param ptrFilterObj
* The pointer to sensor filter data structure
*
* \param ptrFilterConfig
* The pointer to sensor filter configuration structure
*
* \param rawCount
* The pointer to sensor raw count
*
* \param baseline
* The pointer to sensor baseline
*
*******************************************************************************/
void Cy_CapSense_AlpRun_Lib(
cy_stc_capsense_alp_fltr_channel_t * ptrFilterObj,
const cy_stc_capsense_alp_fltr_config_t * ptrFilterConfig,
uint16_t * rawCount,
const uint16_t * baseline);
/*******************************************************************************
* Function Name: Cy_CapSense_AlpInitialize_Lib
****************************************************************************//**
*
* Initializes filter data structure.
*
* \param ptrFilterObj
* Pointer to filter data structure
*
* \param rawCount
* Pointer to sensor raw count
*
*******************************************************************************/
void Cy_CapSense_AlpInitialize_Lib(
cy_stc_capsense_alp_fltr_channel_t * ptrFilterObj,
const uint16_t * rawCount);
/*******************************************************************************
* Function Name: Cy_CapSense_AlpResetState_Lib
****************************************************************************//**
*
* Resets state machine of the filter.
*
* \param ptrFilterObj
* Pointer to the filter data structure
*
*******************************************************************************/
void Cy_CapSense_AlpResetState_Lib(
cy_stc_capsense_alp_fltr_channel_t * ptrFilterObj);
/*******************************************************************************
* Function Name: Cy_CapSense_AlpGetAverage_Lib
****************************************************************************//**
*
* Returns the output of internal average filter
*
* \param ptrFilterObj
* Pointer to the filter data structure
*
* \return
* Returns the output of internal average filter
*
*******************************************************************************/
uint32_t Cy_CapSense_AlpGetAverage_Lib(
const cy_stc_capsense_alp_fltr_channel_t * ptrFilterObj);
/*******************************************************************************
* Function Name: Cy_CapSense_TunePrescalers_Lib
****************************************************************************//**
*
* This internal function tunes the Sense Clock divider.
*
* \param config
* The configuration structure.
*
* \return
* Cp in fF (10^-15)
*
*******************************************************************************/
uint32_t Cy_CapSense_TunePrescalers_Lib(
cy_stc_capsense_auto_tune_config_t * config);
/*******************************************************************************
* Function Name: Cy_CapSense_TuneSensitivity_Lib
****************************************************************************//**
*
* Configure scanning resolution to achieve the sufficient sensitivity.
*
* This function requires non-zero Modulator IDAC code (if IDAC is equal to zero it
* is considered as non-valid use case).
*
* \param config
* The configuration structure.
*
* \return
* Scan resolution
*
*******************************************************************************/
uint8_t Cy_CapSense_TuneSensitivity_Lib(
cy_stc_capsense_auto_tune_config_t * config);
/*******************************************************************************
* Function Name: Cy_CapSense_GetSmartSenseCapacitance
****************************************************************************//**
*
* Returns capacitance that corresponds to the provided parameters.
*
* \param autoTuneConfig
* The configuration structure.
*
* \return
* Returns capacitance in femto-farads.
*
*******************************************************************************/
uint32_t Cy_CapSense_GetSmartSenseCapacitance(
cy_stc_capsense_hw_smartsense_config_t * autoTuneConfig);
/*******************************************************************************
* Function Name: Cy_CapSense_GetSmartSenseFrequencyDivider
****************************************************************************//**
*
* Returns minimum sense clock divider.
*
* \param autoTuneConfig
* The configuration structure.
*
* \return
* Returns sense clock divider.
*
*******************************************************************************/
uint32_t Cy_CapSense_GetSmartSenseFrequencyDivider(
cy_stc_capsense_hw_smartsense_config_t * autoTuneConfig);
/*******************************************************************************
* Function Name: Cy_CapSense_GetSmartSenseNumSubconversions
****************************************************************************//**
*
* Returns optimum number of sub-conversions.
*
* \param autoTuneConfig
* The configuration structure.
*
* \return
* Returns number of sub-conversions.
*
*******************************************************************************/
uint32_t Cy_CapSense_GetSmartSenseNumSubconversions(
cy_stc_capsense_hw_smartsense_config_t * autoTuneConfig);
/*******************************************************************************
* Function Name: Cy_CapSense_UpdateThresholds_Lib
****************************************************************************//**
*
* Updates noise and finger thresholds for a specified widget.
*
* This function comprises an algorithm of thresholds auto-tune. The thresholds
* object contains updated thresholds after this API is called.
*
* \param ptrNoiseEnvelope
* The pointer to the noise-envelope object in RAM.
*
* \param ptrThresholds
* The pointer to the thresholds object.
*
* \param sigPFC
* Signal per finger capacitance.
*
* \param startFlag
* The flag indicates a first sensor in a widget.
*
*******************************************************************************/
void Cy_CapSense_UpdateThresholds_Lib(
const cy_stc_capsense_smartsense_csd_noise_envelope_t * ptrNoiseEnvelope,
cy_stc_capsense_smartsense_update_thresholds_t * ptrThresholds,
uint16_t sigPFC,
uint32_t startFlag);
/*******************************************************************************
* Function Name: Cy_CapSense_InitializeNoiseEnvelope_Lib
****************************************************************************//**
*
* Initializes the noise-envelope filter.
*
* \param rawCount
* The RawCount value for a given sensor.
*
* \param sigPFC
* Signal per finger capacitance.
*
* \param ptrNoiseEnvelope
* The pointer to the noise-envelope RAM object of the sensor.
*
*******************************************************************************/
void Cy_CapSense_InitializeNoiseEnvelope_Lib(
uint16_t rawCount,
uint16_t sigPFC,
cy_stc_capsense_smartsense_csd_noise_envelope_t * ptrNoiseEnvelope);
/*******************************************************************************
* Function Name: Cy_CapSense_RunNoiseEnvelope_Lib
****************************************************************************//**
*
* Runs the noise-envelope filter.
*
* \param rawCount
* The RawCount value for a given sensor.
*
* \param sigPFC
* Signal per finger capacitance.
*
* \param ptrNoiseEnvelope
* The pointer to the noise-envelope RAM object of the sensor.
*
*******************************************************************************/
void Cy_CapSense_RunNoiseEnvelope_Lib(
uint16_t rawCount,
uint16_t sigPFC,
cy_stc_capsense_smartsense_csd_noise_envelope_t * ptrNoiseEnvelope);
/** \} \endcond */
#if defined(__cplusplus)
}
#endif
#endif /* CY_CAPSENSE_LIB_H */
/* [] END OF FILE */