Capacitive Touch Library
Description of the Capacitive Touch Library

C:/USERDATA/MSP430/GIT/msp430captouch/Source/CTS_Layer.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002  *
00003  *  CTS_HAL.h
00004  * 
00005  *  Redistribution and use in source and binary forms, with or without 
00006  *  modification, are permitted provided that the following conditions 
00007  *  are met:
00008  *
00009  *    Redistributions of source code must retain the above copyright 
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  *    Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the 
00014  *    documentation and/or other materials provided with the   
00015  *    distribution.
00016  *
00017  *    Neither the name of Texas Instruments Incorporated nor the names of
00018  *    its contributors may be used to endorse or promote products derived
00019  *    from this software without specific prior written permission.
00020  *
00021  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
00022  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
00023  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00024  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
00025  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
00026  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
00027  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00028  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00029  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
00030  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00031  *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00032  *
00033  ******************************************************************************/
00034  
00035 /***************************************************************************/
00065 #ifndef CTS_LAYER
00066 #define CTS_LAYER
00067 
00068 #include "CTS_HAL.h"
00069 
00072 //
00074 #define EVNT            0x01 
00075 
00076 
00077 #define DOI_MASK        0x02 
00078 #define DOI_INC         0x02  
00079 #define DOI_DEC         0x00  
00080 
00081 
00082 #define PAST_EVNT       0x04  
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 #define TRIDOI_VSLOW    0x00   
00092 #define TRIDOI_SLOW     0x10   
00093 #define TRIDOI_MED      0x20  
00094 #define TRIDOI_FAST     0x30  
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 #define TRADOI_FAST     0x00   
00103 #define TRADOI_MED      0x40   
00104 #define TRADOI_SLOW     0x80  
00105 #define TRADOI_VSLOW    0xC0  
00106 
00108 
00109 
00110 // API Calls
00111 void TI_CAPT_Init_Baseline(const struct Sensor*);
00112 void TI_CAPT_Update_Baseline(const struct Sensor*, uint8_t);
00113 
00114 void TI_CAPT_Reset_Tracking(void);
00115 void TI_CAPT_Update_Tracking_DOI(uint8_t);
00116 void TI_CAPT_Update_Tracking_Rate(uint8_t);
00117 
00118 void TI_CAPT_Raw(const struct Sensor*, uint16_t*);
00119 
00120 void TI_CAPT_Custom(const struct Sensor *, uint16_t*);
00121 
00122 uint8_t TI_CAPT_Button(const struct Sensor *);
00123 const struct Element * TI_CAPT_Buttons(const struct Sensor *);
00124 uint16_t TI_CAPT_Slider(const struct Sensor*);
00125 uint16_t TI_CAPT_Wheel(const struct Sensor*);
00126 
00127 // Internal Calls
00128 uint8_t Dominant_Element (const struct Sensor*, uint16_t*);
00129 
00130 #endif
 All Files Functions