MSP430™CapTIvateSoftwareLibraryAPIGuide  1_70_00_03
CAPT_Touch.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // CAPT_Touch.h
3 //
5 //
10 //
13 //
14 //*****************************************************************************
15 //*****************************************************************************
18 //*****************************************************************************
19 #ifndef __CAPT_TOUCH__
20 #define __CAPT_TOUCH__
21 
22 #include "CAPT_HAL.h"
23 
24 //*****************************************************************************
25 //
29 //
32 //
35 //
36 //*****************************************************************************
37 extern void CAPT_blockOnFlag(volatile bool *pFlag, uint8_t ui8LPM);
38 
39 
40 //*****************************************************************************
41 //
46 //
51 //
54 //
55 //*****************************************************************************
56 extern void CAPT_loadCycle(tSensor *pSensor, uint8_t ui8Cycle,
57  uint8_t ui8Freq, bool bFSM);
58 
59 
60 //*****************************************************************************
61 //
66 //
72 //
75 //
76 //*****************************************************************************
77 extern void CAPT_unloadCycle(tSensor *pSensor, uint8_t ui8Cycle,
78  uint8_t ui8Index, bool bFSM);
79 
80 
81 //*****************************************************************************
82 //
86 //
88 //
91 //
92 //*****************************************************************************
93 extern void CAPT_startConversion(volatile bool *pbEndOfConversionFlag);
94 
95 
96 //*****************************************************************************
97 //
100 //
102 //
105 //
106 //*****************************************************************************
107 extern void CAPT_cleanupAfterConversion(void);
108 
109 
110 //*****************************************************************************
111 //
115 //
117 //
120 //
121 //*****************************************************************************
123  volatile bool *pbEndOfConversionFlag, uint8_t ui8LPM);
124 
125 
126 //*****************************************************************************
127 //
136 //
137 //*****************************************************************************
138 extern void CAPT_initSensor(tSensor *pSensor);
139 
140 
141 //*****************************************************************************
142 //
155 //
156 //*****************************************************************************
157 extern void CAPT_updateSensor(tSensor *pSensor, uint8_t ui8LPM);
158 
159 
160 //*****************************************************************************
161 //
184 //
185 //*****************************************************************************
186 extern void CAPT_updateSensorRawCount(tSensor* pSensor,
187  tRawConversionStyle conversion, tOversamplingStyle oversampling,
188  uint8_t ui8LPM);
189 
190 
191 //*****************************************************************************
192 //
203 //
218 //
221 //
222 //*****************************************************************************
223 extern void CAPT_startWakeOnProxMode(tSensor* pSensor, uint8_t ui8Cycle,
224  uint16_t ui16WakeupInterval);
225 
226 
227 //*****************************************************************************
228 //
233 //
236 //
239 //
240 //*****************************************************************************
241 extern void CAPT_stopWakeOnProxMode(tSensor* pSensor, uint8_t ui8Cycle);
242 
243 
244 //*****************************************************************************
245 //
258 //
259 //*****************************************************************************
260 extern void CAPT_processFSMCycle(tSensor *pSensor, tCycle *pCycle);
261 
262 
263 //*****************************************************************************
264 //
273 //
274 //*****************************************************************************
275 extern void CAPT_processSensor(tSensor *pSensor);
276 
277 
278 //*****************************************************************************
279 //
292 //
293 //*****************************************************************************
294 extern bool CAPT_testForRecalibration(tSensor *pSensor);
295 
296 //*****************************************************************************
297 //
308 //
309 //*****************************************************************************
310 extern bool CAPT_testForMaxCountRecalibration(tSensor *pSensor);
311 
312 //*****************************************************************************
313 //
324 //
325 //*****************************************************************************
326 extern bool CAPT_testForNegativeTouchRecalibration(tSensor *pSensor);
327 
328 //*****************************************************************************
329 //
339 //
340 //*****************************************************************************
341 extern void CAPT_flagAllElementsForReseed(tSensor* pSensor);
342 
343 
344 //*****************************************************************************
345 //
355 //
356 //*****************************************************************************
357 extern void CAPT_updateSensorTimeout(tSensor *pSensor);
358 
359 
360 //*****************************************************************************
361 //
371 //
372 //*****************************************************************************
373 extern void CAPT_updateSensorNoise(tSensor *pSensor);
374 
375 
376 //*****************************************************************************
377 //
382 //
385 //
388 //
389 //*****************************************************************************
390 extern uint8_t CAPT_convertAbsToRel(uint16_t ui16Ref, uint16_t ui16Abs);
391 
392 
393 //*****************************************************************************
394 //
398 //
401 //
404 //
405 //*****************************************************************************
406 extern uint16_t CAPT_convertRelToAbs(uint16_t ui16Ref, uint8_t ui8Rel);
407 
408 
409 //*****************************************************************************
410 //
412 //
423 //
436 //
437 //*****************************************************************************
438 extern uint64_t CAPT_getElementStateBitField(tSensor *pSensor,
439  tElementStatusType status);
440 
441 
442 //*****************************************************************************
443 //
458 //
459 //*****************************************************************************
460 extern void CAPT_registerCallback(tSensor *pSensor,
461  void (* user_callback)(tSensor *pSensor));
462 
463 
464 //*****************************************************************************
465 //
476 //
477 //*****************************************************************************
478 extern void CAPT_registerTrackPadSensorProcessing(tSensor *pSensor, void (* user_function)(tSensor*));
479 
480 
481 //*****************************************************************************
482 //
490 //
491 //*****************************************************************************
492 extern void CAPT_registerTrackPadGestureProcessing(tSensor *pSensor, void (* user_function)(tSensor*));
493 
494 
495 //*****************************************************************************
496 //
505 //
506 //*****************************************************************************
507 extern void CAPT_clearSensorProxTouch(tSensor *pSensor);
508 
509 
510 //*****************************************************************************
511 //
526 //
527 //*****************************************************************************
528 extern IQ16_t CAPT_computeIIRFilter(IQ16_t *pRaw, IQ16_t *pFiltered,
529  uint8_t ui8Beta);
530 
531 
532 //*****************************************************************************
533 //
548 //
549 //*****************************************************************************
550 extern IQ16_t CAPT_computeIIRFilterFast(IQ16_t *pRaw, IQ16_t *pFiltered,
551  uint8_t ui8Beta);
552 
553 
554 //*****************************************************************************
555 //
567 //
568 //*****************************************************************************
569 extern void CAPT_reseedFilterAll(tSensor *pSensor, tFilterOption WhatToFilter);
570 
571 
572 //*****************************************************************************
573 //
585 //
586 //*****************************************************************************
587 extern void CAPT_reseedFilter(IQ16_t *pFilter, uint16_t ui16ReseedValue);
588 
589 
590 //*****************************************************************************
591 //
605 //
606 //*****************************************************************************
607 extern bool CAPT_updateProx(tSensor *pSensor, tElement *pElement);
608 
609 
610 //*****************************************************************************
611 //
624 //
625 //*****************************************************************************
626 extern bool CAPT_updateTouch(tSensor *pSensor, tElement *pElement);
627 
628 
629 //*****************************************************************************
630 //
642 //
643 //*****************************************************************************
644 extern void CAPT_updateLTA(tSensor *pSensor, tElement *pElement);
645 
646 
647 //*****************************************************************************
648 //
661 //
662 //*****************************************************************************
663 extern void CAPT_updateFilterCount(tSensor *pSensor, tElement *pElement);
664 
665 
666 //*****************************************************************************
678 //*****************************************************************************
679 extern void CAPT_updateFilterCounts(tCycle *pCycle, uint8_t ui8Beta);
680 
681 
682 //*****************************************************************************
683 //
694 //
695 //*****************************************************************************
696 extern void CAPT_updateFSMProx(tSensor *pSensor, tElement *pElement);
697 
698 
699 //*****************************************************************************
700 //
713 //
714 //*****************************************************************************
715 extern void CAPT_updateFSMTouch(tSensor *pSensor, tElement *pElement);
716 
717 
718 //*****************************************************************************
719 //
730 //
731 //*****************************************************************************
732 extern void CAPT_updateSensorProxTouch(tSensor *pSensor);
733 
734 
735 //*****************************************************************************
736 //
737 //
738 //
739 // THE FOLLOWING FUNCTIONS ARE SPECIFIC TO SENSORS WITH NOISE IMMUNUITY
740 // (EMC) ENABLED.
741 //
742 //
743 //
744 //*****************************************************************************
745 
746 
747 //*****************************************************************************
748 //
756 //
757 //*****************************************************************************
758 extern void CAPT_updateSensorWithEMC(tSensor *pSensor, uint8_t ui8LPM);
759 
760 
761 //*****************************************************************************
762 //
774 //
775 //*****************************************************************************
776 extern void CAPT_processCycleWithEMC(tSensor *pSensor, const tCycle *pCycle);
777 
778 
779 //*****************************************************************************
780 //
790 //
791 //*****************************************************************************
793  tElement *pElement);
794 
795 
796 //*****************************************************************************
797 //
807 //
808 //*****************************************************************************
810  tElement *pElement);
811 
812 
813 //*****************************************************************************
814 //
824 //
825 //*****************************************************************************
827  tElement *pElement);
828 
829 #endif
830 //*****************************************************************************
833 //*****************************************************************************
bool CAPT_testForRecalibration(tSensor *pSensor)
void CAPT_registerCallback(tSensor *pSensor, void(*user_callback)(tSensor *pSensor))
void CAPT_registerTrackPadSensorProcessing(tSensor *pSensor, void(*user_function)(tSensor *))
void CAPT_updateFSMTouch(tSensor *pSensor, tElement *pElement)
void CAPT_blockOnFlag(volatile bool *pFlag, uint8_t ui8LPM)
typedef IQ16_t
Definition: CAPT_Type.h:352
bool CAPT_updateTouch(tSensor *pSensor, tElement *pElement)
void CAPT_reseedFilterAll(tSensor *pSensor, tFilterOption WhatToFilter)
void CAPT_updateLTA(tSensor *pSensor, tElement *pElement)
uint8_t tOversamplingStyle
Definition: CAPT_Type.h:260
void CAPT_updateSensorWithEMC(tSensor *pSensor, uint8_t ui8LPM)
void CAPT_updateElementFilteredValuesWithEMC(tSensor *pSensor, tElement *pElement)
void CAPT_reseedFilter(IQ16_t *pFilter, uint16_t ui16ReseedValue)
void CAPT_startConversionAndWaitUntilDone(volatile bool *pbEndOfConversionFlag, uint8_t ui8LPM)
Definition: CAPT_Type.h:654
void CAPT_updateSensor(tSensor *pSensor, uint8_t ui8LPM)
bool CAPT_updateProjElementProxTouchWithEMC(tSensor *pSensor, tElement *pElement)
bool CAPT_testForMaxCountRecalibration(tSensor *pSensor)
uint8_t tFilterOption
Definition: CAPT_Type.h:163
void CAPT_cleanupAfterConversion(void)
typedef tElement
Definition: CAPT_Type.h:453
void CAPT_initSensor(tSensor *pSensor)
bool CAPT_updateProx(tSensor *pSensor, tElement *pElement)
uint64_t CAPT_getElementStateBitField(tSensor *pSensor, tElementStatusType status)
Get a bit field of the requested state of all elements in the sensor.
void CAPT_updateFilterCounts(tCycle *pCycle, uint8_t ui8Beta)
void CAPT_updateSensorNoise(tSensor *pSensor)
void CAPT_updateFSMProx(tSensor *pSensor, tElement *pElement)
void CAPT_flagAllElementsForReseed(tSensor *pSensor)
uint8_t CAPT_convertAbsToRel(uint16_t ui16Ref, uint16_t ui16Abs)
void CAPT_processFSMCycle(tSensor *pSensor, tCycle *pCycle)
void CAPT_processSensor(tSensor *pSensor)
void CAPT_unloadCycle(tSensor *pSensor, uint8_t ui8Cycle, uint8_t ui8Index, bool bFSM)
bool CAPT_updateSelfElementProxTouchWithEMC(tSensor *pSensor, tElement *pElement)
IQ16_t CAPT_computeIIRFilterFast(IQ16_t *pRaw, IQ16_t *pFiltered, uint8_t ui8Beta)
void CAPT_startConversion(volatile bool *pbEndOfConversionFlag)
void CAPT_processCycleWithEMC(tSensor *pSensor, const tCycle *pCycle)
Definition: CAPT_Type.h:606
void CAPT_updateSensorRawCount(tSensor *pSensor, tRawConversionStyle conversion, tOversamplingStyle oversampling, uint8_t ui8LPM)
void CAPT_clearSensorProxTouch(tSensor *pSensor)
uint8_t tRawConversionStyle
Definition: CAPT_Type.h:213
void CAPT_startWakeOnProxMode(tSensor *pSensor, uint8_t ui8Cycle, uint16_t ui16WakeupInterval)
void CAPT_updateSensorProxTouch(tSensor *pSensor)
uint8_t tElementStatusType
Definition: CAPT_Type.h:301
void CAPT_loadCycle(tSensor *pSensor, uint8_t ui8Cycle, uint8_t ui8Freq, bool bFSM)
void CAPT_updateFilterCount(tSensor *pSensor, tElement *pElement)
void CAPT_stopWakeOnProxMode(tSensor *pSensor, uint8_t ui8Cycle)
void CAPT_updateSensorTimeout(tSensor *pSensor)
uint16_t CAPT_convertRelToAbs(uint16_t ui16Ref, uint8_t ui8Rel)
void CAPT_registerTrackPadGestureProcessing(tSensor *pSensor, void(*user_function)(tSensor *))
IQ16_t CAPT_computeIIRFilter(IQ16_t *pRaw, IQ16_t *pFiltered, uint8_t ui8Beta)
bool CAPT_testForNegativeTouchRecalibration(tSensor *pSensor)
© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale